1pass.c
changeset 15 e2973f4fb366
parent 12 6a2d5b34d5ca
child 16 f5a7ede6c1f3
equal deleted inserted replaced
14:f359fb8eec3c 15:e2973f4fb366
    26     return 1;
    26     return 1;
    27 } // retvalStringBytes
    27 } // retvalStringBytes
    28 
    28 
    29 static inline int retvalString(lua_State *L, const char *str)
    29 static inline int retvalString(lua_State *L, const char *str)
    30 {
    30 {
    31     return retvalStringBytes(L, (const uint8_t *) str, strlen(str));
    31     return retvalStringBytes(L, (const uint8_t *) str, str ? strlen(str) : 0);
    32 } // retvalString
    32 } // retvalString
    33 
    33 
    34 static inline int retvalPointer(lua_State *L, void *ptr)
    34 static inline int retvalPointer(lua_State *L, void *ptr)
    35 {
    35 {
    36     if (ptr != NULL)
    36     if (ptr != NULL)