util.h
changeset 6 90073cbb535d
parent 4 5770be2d5f3f
child 15 1a5dd51722f5
equal deleted inserted replaced
5:e617c9cf6dd3 6:90073cbb535d
     6 
     6 
     7 // You can set this if anther type is required
     7 // You can set this if anther type is required
     8 #ifndef enum_value_t
     8 #ifndef enum_value_t
     9 #define enum_value_t int
     9 #define enum_value_t int
    10 #endif
    10 #endif
       
    11 
       
    12 #define lua_pushconststring(L, STRING) { lua_pushlstring (L, STRING, sizeof(STRING)); }
    11 
    13 
    12 // Array of string2eunm_t's must be ended with pair { NULL, fallback_value }
    14 // Array of string2eunm_t's must be ended with pair { NULL, fallback_value }
    13 typedef struct {
    15 typedef struct {
    14 	const char   *string;
    16 	const char   *string;
    15 	enum_value_t  value;
    17 	enum_value_t  value;