Re: Crashes with builds from today and yesterday [typo fix]



Roland Illig wrote:
----
g_strdup: If you use g_strdup to create a local copy of a string, use
    the following pattern to keep the reference.

    char * const pathref = g_strdup(argument);
    /* ... */
    g_free (pathref);

-     The "const" will make the pointer unmodifiable (local_copy++
+     The "const" will make the pointer unmodifiable (pathref++
    is not possible), but you can still modify the string contents.
----

Roland



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]