|
@@ -113,16 +113,12 @@ typedef CXType (*clang_getResultType_t)(CXType);
|
|
|
static clang_getResultType_t dlclang_getResultType = 0;
|
|
static clang_getResultType_t dlclang_getResultType = 0;
|
|
|
// generated-code:end
|
|
// generated-code:end
|
|
|
|
|
|
|
|
-#ifdef WIN32
|
|
|
|
|
-#define DYNLIB_NAME "libclang.dll"
|
|
|
|
|
-#else
|
|
|
|
|
-#define DYNLIB_NAME "libclang.so"
|
|
|
|
|
-#endif
|
|
|
|
|
|
|
+static const char *dynamicLibName = DYNLIB_FOR_OS(libclang);
|
|
|
|
|
|
|
|
static bool load_dynamicLib()
|
|
static bool load_dynamicLib()
|
|
|
{
|
|
{
|
|
|
if(dlclang_createIndex) return true;
|
|
if(dlclang_createIndex) return true;
|
|
|
- if(dynamicLib.open(DYNLIB_NAME))
|
|
|
|
|
|
|
+ if(dynamicLib.open(dynamicLibName))
|
|
|
{
|
|
{
|
|
|
//@write_dynamic_functions_load();
|
|
//@write_dynamic_functions_load();
|
|
|
// generated-code:begin
|
|
// generated-code:begin
|
|
@@ -188,11 +184,11 @@ static SQRESULT get_libclang_instance(HSQUIRRELVM v, SQInteger idx, MyLibClang *
|
|
|
return _rc_;
|
|
return _rc_;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#define GET_libclang_INSTANCE_AT(idx) \
|
|
|
|
|
- MyLibClang *self=NULL; \
|
|
|
|
|
|
|
+#define GET_libclang_INSTANCE_AT(idx) \
|
|
|
|
|
+ MyLibClang *self=NULL; \
|
|
|
if((_rc_ = get_libclang_instance(v,idx,&self)) < 0) return _rc_;
|
|
if((_rc_ = get_libclang_instance(v,idx,&self)) < 0) return _rc_;
|
|
|
|
|
|
|
|
-#define GET_libclang_INSTANCE() GET_libclang_INSTANCE_AT(1)
|
|
|
|
|
|
|
+#define GET_libclang_INSTANCE() GET_libclang_INSTANCE_AT(1)
|
|
|
|
|
|
|
|
static void release_visitor_cb(MyLibClang *self)
|
|
static void release_visitor_cb(MyLibClang *self)
|
|
|
{
|
|
{
|