#include <stdarg.h>
#include <stdbool.h>
#include <LuaCocoa/lua.h>
#include <LuaCocoa/lualib.h>
#include <LuaCocoa/lauxlib.h>
#import <Foundation/Foundation.h>
Go to the source code of this file.
Classes | |
class | LuaCocoa |
LuaCocoa is the primary class you use to bridge your Lua code with Objective-C (and vice-versa). More... | |
Functions | |
bool | LuaCocoa_IsInstance (struct lua_State *lua_state, int stack_index) |
Returns true if an instance of an Obj-C class. | |
id | LuaCocoa_CheckInstance (struct lua_State *lua_state, int stack_index) |
Returns an Obj-C instance or triggers a Lua error. | |
id | LuaCocoa_ToInstance (struct lua_State *lua_state, int stack_index) |
Returns an Obj-C instance. | |
void | LuaCocoa_PushInstance (struct lua_State *lua_state, id the_object) |
Pushes an Obj-C instance. | |
bool | LuaCocoa_IsClass (struct lua_State *lua_state, int stack_index) |
Returns true if an Obj-C class. | |
Class | LuaCocoa_CheckClass (struct lua_State *lua_state, int stack_index) |
Returns an Obj-C class or triggers a Lua error. | |
Class | LuaCocoa_ToClass (struct lua_State *lua_state, int stack_index) |
Returns an Obj-C class. | |
void | LuaCocoa_PushClass (struct lua_State *lua_state, Class the_class) |
Pushes an Obj-C class. | |
bool | LuaCocoa_IsNSNumber (struct lua_State *lua_state, int stack_index) |
Returns true for integers, floats, booleans, and NSNumbers. | |
NSNumber * | LuaCocoa_CheckNSNumber (struct lua_State *lua_state, int stack_index) |
Returns a NSNumber or triggers a Lua error. | |
NSNumber * | LuaCocoa_ToNSNumber (struct lua_State *lua_state, int stack_index) |
Returns a NSNumber. | |
void | LuaCocoa_PushUnboxedNSNumber (struct lua_State *lua_state, NSNumber *the_number) |
Pushes a Lua number converted from an NSNumber onto the stack (instead of pushing the NSObject through the bridge). | |
bool | LuaCocoa_IsNSNull (struct lua_State *lua_state, int stack_index) |
Returns true if the object at the specified index is nil or NSNull. | |
NSNull * | LuaCocoa_CheckNSNull (struct lua_State *lua_state, int stack_index) |
Returns NSNull or triggers a Lua error. | |
NSNull * | LuaCocoa_ToNSNull (struct lua_State *lua_state, int stack_index) |
Returns NSNull. | |
bool | LuaCocoa_IsNSString (struct lua_State *lua_state, int stack_index) |
Returns true for strings, numbers (which is always convertible to a string), and NSString. | |
NSString * | LuaCocoa_CheckNSString (struct lua_State *lua_state, int stack_index) |
Returns a NSString or triggers a Lua error. | |
NSString * | LuaCocoa_ToNSString (struct lua_State *lua_state, int stack_index) |
Returns a NSString. | |
void | LuaCocoa_PushUnboxedNSString (struct lua_State *lua_state, NSString *the_string) |
Pushes a Lua string converted from an NSString onto the stack (instead of pushing the NSObject through the bridge). | |
__strong const char * | LuaCocoa_ToString (struct lua_State *lua_state, int stack_index) |
If a NSString, returns C-string, or if C-string, returns C-string. | |
bool | LuaCocoa_IsNSArray (struct lua_State *lua_state, int stack_index) |
Returns true for Lua arrays and NSArrays. | |
void | LuaCocoa_PushUnboxedNSArray (struct lua_State *lua_state, NSArray *the_array) |
Converts a NSArray to a Lua array (table) and pushes it on the stack. | |
bool | LuaCocoa_IsNSDictionary (struct lua_State *lua_state, int stack_index) |
Returns true for Lua tables and NSDictionaries. | |
void | LuaCocoa_PushUnboxedNSDictionary (struct lua_State *lua_state, NSDictionary *the_dictionary) |
Converts a NSDictionary to a Lua table and pushes it on the stack. | |
bool | LuaCocoa_IsPropertyList (struct lua_State *lua_state, int stack_index) |
Returns true for NSNumber/number, NSNull/nil, NSString/string, NSDictionary, NSArray, or a Lua table. | |
id | LuaCocoa_ToPropertyList (struct lua_State *lua_state, int stack_index) |
Converts Lua types to Cocoa types. | |
void | LuaCocoa_PushUnboxedPropertyList (struct lua_State *lua_state, id the_object) |
Converts Cocoa types to Lua types and pushes on the stack. | |
bool | LuaCocoa_IsSelector (struct lua_State *lua_state, int stack_index) |
Returns true for selectors or selectors boxed in NSValues. | |
SEL | LuaCocoa_CheckSelector (struct lua_State *lua_state, int stack_index) |
Returns a selector or triggers a Lua error. | |
SEL | LuaCocoa_ToSelector (struct lua_State *lua_state, int stack_index) |
Returns a selector. | |
void | LuaCocoa_PushSelector (struct lua_State *lua_state, SEL the_selector) |
Pushes a selector into Lua. | |
NSString * | LuaCocoa_GetInfoOnFunction (lua_State *lua_state, const char *function_name, int *line_defined, int *last_line_defined) |
Helper function to get debug info on a Lua function. | |
NSString * | LuaCocoa_ParseForErrorFilenameAndLineNumber (NSString *the_string, int *line_number) |
Helper function to parse a Lua error string and extract the filename and line number. | |
NSString * | LuaCocoa_PcallLuaFunction (lua_State *lua_state, lua_CFunction lua_error_function, const char *lua_function_name, const char *parameter_signature,...) |
Convenience method to pcall functions in Lua and allows an error function to be specified. | |
NSString * | LuaCocoa_PcallLuaFunctionv (lua_State *lua_state, lua_CFunction lua_error_function, const char *lua_function_name, const char *parameter_signature, va_list vl) |
Convenience method to pcall functions in Lua and allows an error function to be specified. | |
void | LuaCocoa_PrependToLuaSearchPath (struct lua_State *lua_state, const char *search_path) |
Prepends a new path the Lua package search path. | |
void | LuaCocoa_AppendToLuaSearchPath (struct lua_State *lua_state, const char *search_path) |
Appends a new path the Lua package search path. | |
void | LuaCocoa_PrependToCSearchPath (struct lua_State *lua_state, const char *search_path) |
Prepends a new path the Lua/C package search path. | |
void | LuaCocoa_AppendToCSearchPath (struct lua_State *lua_state, const char *search_path) |
Appends a new path the Lua/C package search path. | |
bool | LuaCocoa_IsStruct (struct lua_State *lua_state, int stack_index) |
Returns true if the object is a struct. | |
bool | LuaCocoa_IsStructWithName (struct lua_State *lua_state, int stack_index, const char *key_name) |
Returns true if the object is a struct of the named type you specify. | |
const char * | LuaCocoa_GetStructName (struct lua_State *lua_state, int stack_index) |
Returns the name of the struct. | |
void * | LuaCocoa_CheckStruct (struct lua_State *lua_state, int stack_index, const char *key_name) |
Returns a pointer to a struct or triggers a Lua error. | |
bool | LuaCocoa_PushStruct (struct lua_State *lua_state, void *the_struct, const char *key_name) |
Pushes a copy of the struct passed in onto the stack. |
void LuaCocoa_AppendToCSearchPath | ( | struct lua_State * | lua_state, |
const char * | search_path | ||
) |
Appends a new path the Lua/C package search path.
Modifies the package.cpath to append the specified string. Should be in proper lua format: e.g. /Users/ewing/Library/Application Support/LuaCocoa/PlugIns/?.so This means you must explicitly include the ?.so (or whatever file extensions you use.)
lua_state | The lua_State to operate on. |
search_path | The path to append. |
void LuaCocoa_AppendToLuaSearchPath | ( | struct lua_State * | lua_state, |
const char * | search_path | ||
) |
Appends a new path the Lua package search path.
Modifies the package.path to append the specified string. Should be in proper lua format: e.g. /Users/ewing/Source/HG/LuaCocoa/Xcode/build/Debug/LuaCocoa.framework/Resources/?.lua This means you must explicitly include the ?.lua (or whatever file extensions you use.)
lua_state | The lua_State to operate on. |
search_path | The path to append. |
Class LuaCocoa_CheckClass | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns an Obj-C class or triggers a Lua error.
Returns an Obj-C class the specified index or triggers a Lua error.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
id LuaCocoa_CheckInstance | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns an Obj-C instance or triggers a Lua error.
Returns an Obj-C instance at the specified index or triggers a Lua error.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSNull* LuaCocoa_CheckNSNull | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns NSNull or triggers a Lua error.
Returns NSNull or triggers a Lua error.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSNumber* LuaCocoa_CheckNSNumber | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a NSNumber or triggers a Lua error.
Returns a NSNumber or triggers a Lua error. If the object is already a NSNumber, this will return the pointer. If the object is an integer, float, or boolean, an NSNumber will be constructed and returned.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSString* LuaCocoa_CheckNSString | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a NSString or triggers a Lua error.
Returns a NSString or triggers a Lua error. If the object is already a NSString, this will return the pointer. If the object is a string or number, an NSString will be constructed and returned.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
SEL LuaCocoa_CheckSelector | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a selector or triggers a Lua error.
Returns a selector or triggers a Lua error. Will handle selectors, boxed selectors in NSValues, strings, and NSStrings.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
void* LuaCocoa_CheckStruct | ( | struct lua_State * | lua_state, |
int | stack_index, | ||
const char * | key_name | ||
) |
Returns a pointer to a struct or triggers a Lua error.
Returns a pointer to a struct by the given name at the specified index or triggers a Lua error.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
key_name | The name of the struct. |
NSString* LuaCocoa_GetInfoOnFunction | ( | lua_State * | lua_state, |
const char * | function_name, | ||
int * | line_defined, | ||
int * | last_line_defined | ||
) |
Helper function to get debug info on a Lua function.
This is a helper function used to get info about a Lua function. This can be useful for dealing with Lua errors and showing where an error occurred. Assumes function exists. Not expecting to be running in Lua at the moment. Returns autoreleased string containing filename or nil. Returns by reference the line number and last line number of the function.
lua_state | The lua_State to operate on. |
function_name | The name of the Lua function. |
line_defined | Returns by reference the line the function is defined on. |
last_line_defined | Returns by reference the line in the function that an error may occured on. |
const char* LuaCocoa_GetStructName | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns the name of the struct.
Returns the name of the struct at the specified index.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsClass | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true if an Obj-C class.
Returns true if the object at the specified index is an Obj-C class.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsInstance | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true if an instance of an Obj-C class.
Returns true if the object at the specified index is an instance of an Obj-C class.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsNSArray | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for Lua arrays and NSArrays.
Returns true if the object at the specified index is a Lua array or NSArray. If you are planning to convert a Lua array to an NSArray, it may be faster to just try converting via ToPropertyList and checking the return value instead of running this function since both functions need to do essentially the same thing.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsNSDictionary | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for Lua tables and NSDictionaries.
Returns true if the object at the specified index is a Lua tables or NSDictionary. If you are planning to convert a Lua tables to an NSDictionary, it may be faster to just try converting via ToPropertyList and checking the return value instead of running this function since both functions need to do essentially the same thing.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsNSNull | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true if the object at the specified index is nil or NSNull.
Returns true if the object at the specified index is nil or NSNull.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsNSNumber | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for integers, floats, booleans, and NSNumbers.
Returns true if the object at the specified index is an integer, float, boolean, or NSNumber.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsNSString | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for strings, numbers (which is always convertible to a string), and NSString.
Returns true if the object at the specified index is a strings, number (which is always convertible to a string), or NSString.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsPropertyList | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for NSNumber/number, NSNull/nil, NSString/string, NSDictionary, NSArray, or a Lua table.
Returns true for NSNumber/number, NSNull/nil, NSString/string, NSDictionary, NSArray, or a Lua table. If you are planning on converting items, espeicial tables and dictionaries, you might want to just call LuaCocoa_ToPropertyList directly and skip the overhead of doing this check since both methods essentially do the same thing.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsSelector | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true for selectors or selectors boxed in NSValues.
Returns true for selectors or selectors boxed in NSValues.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsStruct | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns true if the object is a struct.
Returns true if the object at the specified index is a struct (as known to the bridge).
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
bool LuaCocoa_IsStructWithName | ( | struct lua_State * | lua_state, |
int | stack_index, | ||
const char * | key_name | ||
) |
Returns true if the object is a struct of the named type you specify.
Returns true if the object at the specified index is a struct of the named type you specify (as known to the bridge).
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
key_name | The name of the struct. |
NSString* LuaCocoa_ParseForErrorFilenameAndLineNumber | ( | NSString * | the_string, |
int * | line_number | ||
) |
Helper function to parse a Lua error string and extract the filename and line number.
Helper function to parse a Lua error string and extract the filename and line number.
the_string | The string containing the Lua error message. |
line_number | Returns by reference the line number the error occurred on. |
NSString* LuaCocoa_PcallLuaFunction | ( | lua_State * | lua_state, |
lua_CFunction | lua_error_function, | ||
const char * | lua_function_name, | ||
const char * | parameter_signature, | ||
... | |||
) |
Convenience method to pcall functions in Lua and allows an error function to be specified.
This convenience method adopts the techniques described in Programming in Lua's call_va function to make calling arbitrary Lua functions a little easier.
LuaCocoa_PcallLuaFunction(lua_state, error_func, @"OnMouseUp" withSignature:"@@idd>bids@@@@", the_layer, layer_name, button_number, x_pos, y_pos, &bool_val, &int_val, &double_val, &str_val, &ns_str_val, &layer_val, &array_val, &dict_val);
lua_state | The lua_State to operate on. |
lua_error_function | The error function to handle any Lua errors. |
lua_function_name | The name of the Lua function to call. |
parameter_signature | A format string describing the parameter types. (See above notes.) |
... | The list of parameters to go with the format string. |
NSString* LuaCocoa_PcallLuaFunctionv | ( | lua_State * | lua_state, |
lua_CFunction | lua_error_function, | ||
const char * | lua_function_name, | ||
const char * | parameter_signature, | ||
va_list | vl | ||
) |
Convenience method to pcall functions in Lua and allows an error function to be specified.
This convenience method adopts the techniques described in Programming in Lua's call_va function to make calling arbitrary Lua functions a little easier.
LuaCocoa_PcallLuaFunctionv(lua_state, error_func, @"OnMouseUp" withSignature:"@@idd>bids@@@@", va_list);
lua_state | The lua_State to operate on. |
lua_error_function | The error function to handle any Lua errors. |
lua_function_name | The name of the Lua function to call. |
parameter_signature | A format string describing the parameter types. (See above notes.) |
vl | The list of parameters to go with the format string. |
void LuaCocoa_PrependToCSearchPath | ( | struct lua_State * | lua_state, |
const char * | search_path | ||
) |
Prepends a new path the Lua/C package search path.
Modifies the package.cpath to append the specified string. Should be in proper lua format: e.g. /Users/ewing/Library/Application Support/LuaCocoa/PlugIns/?.so This means you must explicitly include the ?.so (or whatever file extensions you use.)
lua_state | The lua_State to operate on. |
search_path | The path to prepend. |
void LuaCocoa_PrependToLuaSearchPath | ( | struct lua_State * | lua_state, |
const char * | search_path | ||
) |
Prepends a new path the Lua package search path.
Modifies the package.path to append the specified string. Should be in proper lua format: e.g. /Users/ewing/Source/HG/LuaCocoa/Xcode/build/Debug/LuaCocoa.framework/Resources/?.lua This means you must explicitly include the ?.lua (or whatever file extensions you use.)
lua_state | The lua_State to operate on. |
search_path | The path to prepend. |
void LuaCocoa_PushClass | ( | struct lua_State * | lua_state, |
Class | the_class | ||
) |
Pushes an Obj-C class.
Pushes an Obj-C class into Lua.
lua_state | The lua_State to operate on. |
the_class | The class to push. |
void LuaCocoa_PushInstance | ( | struct lua_State * | lua_state, |
id | the_object | ||
) |
Pushes an Obj-C instance.
Pushes an Obj-C instance into Lua.
lua_state | The lua_State to operate on. |
the_object | The object to push. |
void LuaCocoa_PushSelector | ( | struct lua_State * | lua_state, |
SEL | the_selector | ||
) |
Pushes a selector into Lua.
On failure, nil is pushed.
lua_state | The lua_State to operate on. |
the_selector | The selector push. |
bool LuaCocoa_PushStruct | ( | struct lua_State * | lua_state, |
void * | the_struct, | ||
const char * | key_name | ||
) |
Pushes a copy of the struct passed in onto the stack.
Pushes a copy of the struct passed in onto the stack. If the metatable for the struct type cannot be found, the function will fail and nothing will be pushed.
lua_state | The lua_State to operate on. |
the_struct | A pointer to the struct to push |
key_name | The name of the struct. |
void LuaCocoa_PushUnboxedNSArray | ( | struct lua_State * | lua_state, |
NSArray * | the_array | ||
) |
Converts a NSArray to a Lua array (table) and pushes it on the stack.
Converts a NSArray to a Lua array (table) and pushes it on the stack. Elements contained in the NSArray will also (recursively) be converted to equivalent Lua types.
lua_state | The lua_State to operate on. |
the_array | The NSArray to push. |
void LuaCocoa_PushUnboxedNSDictionary | ( | struct lua_State * | lua_state, |
NSDictionary * | the_dictionary | ||
) |
Converts a NSDictionary to a Lua table and pushes it on the stack.
Elements contained in the NSDictionary will also (recursively) be converted to equivalent Lua types. Converts a NSDictionary to a Lua table and pushes it on the stack. Converts a NSDictionary to a Lua table and pushes it on the stack. Elements contained in the NSDictionary will also (recursively) be converted to equivalent Lua types.
lua_state | The lua_State to operate on. |
the_dictionary | The NSDictionary to push. |
void LuaCocoa_PushUnboxedNSNumber | ( | struct lua_State * | lua_state, |
NSNumber * | the_number | ||
) |
Pushes a Lua number converted from an NSNumber onto the stack (instead of pushing the NSObject through the bridge).
Note that if the NSNumber is a boolean, it will push a Lua boolean instead. On failure, nil is pushed.
lua_state | The lua_State to operate on. |
the_number | The NSNumber to copy/push. |
void LuaCocoa_PushUnboxedNSString | ( | struct lua_State * | lua_state, |
NSString * | the_string | ||
) |
Pushes a Lua string converted from an NSString onto the stack (instead of pushing the NSObject through the bridge).
On failure, nil is pushed.
lua_state | The lua_State to operate on. |
the_string | The NSString to copy/push. |
void LuaCocoa_PushUnboxedPropertyList | ( | struct lua_State * | lua_state, |
id | the_object | ||
) |
Converts Cocoa types to Lua types and pushes on the stack.
Converts the following Cocoa containers to their Lua equivalent types: NSNumber => number, NSNull => nil, NSString => string, NSDictionary => table, NSArray => table. Elements contained in NSDictionaries and NSArrays will also (recursively) be converted to their Lua equivalent types. This method will recursively convert items in arrays and dictionaries.
lua_state | The lua_State to operate on. |
the_object | The Cocoa object to convert to Lua and push. |
Class LuaCocoa_ToClass | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns an Obj-C class.
Returns an Obj-C class at the specified index or nil.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
id LuaCocoa_ToInstance | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns an Obj-C instance.
Returns an Obj-C instance at the specified index or nil.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSNull* LuaCocoa_ToNSNull | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns NSNull.
Returns NSNull at the specified index or nil.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSNumber* LuaCocoa_ToNSNumber | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a NSNumber.
Returns a NSNumber at the specified index or nil. If the object is already a NSNumber, this will return the pointer. If the object is an integer, float, or boolean, an NSNumber will be constructed and returned.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
NSString* LuaCocoa_ToNSString | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a NSString.
Returns a NSString at the specified index or nil. If the object is already a NSString, this will return the pointer. If the object is a string or number, an NSString will be constructed and returned.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
id LuaCocoa_ToPropertyList | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Converts Lua types to Cocoa types.
Returns or converts the element at the stack index to one of the appropriate Cocoa containers: NSNumber => number, NSNull => nil, NSString => string, NSDictionary => table, NSArray => table. In NSDictionaries and NSArrays, NSNull might be substituted as placeholders for Lua types that can't be boxed/converted to Cocoa equivalents. This method will recursively convert items in arrays and dictionaries.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
SEL LuaCocoa_ToSelector | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
Returns a selector.
Returns a selector at the specified index or nil.
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |
__strong const char* LuaCocoa_ToString | ( | struct lua_State * | lua_state, |
int | stack_index | ||
) |
If a NSString, returns C-string, or if C-string, returns C-string.
Returns a C string. Returns a C string at the specified index or nil. If the object is a NSString, the implementation tends to call UTF8String/
lua_state | The lua_State to operate on. |
stack_index | The index of the stack of the object you want to know about. |