@@ -27862,6 +27862,7 @@ typedef struct {
27862
27862
27863
27863
void (*set_sub_table_by_index)(LuaCEmbedTable *self, long index,LuaCEmbedTable *sub_table);
27864
27864
void (*set_string_by_index)(LuaCEmbedTable *self, long index, const char *value);
27865
+ void (*set_raw_string_by_index)(LuaCEmbedTable *self, long index, const char *value,long size);
27865
27866
void (*set_long_by_index)(LuaCEmbedTable *self, long long index, long value);
27866
27867
void (*set_double_by_index)(LuaCEmbedTable *self, long index, double value);
27867
27868
void (*set_bool_by_index)(LuaCEmbedTable *self, long index, bool value);
@@ -27873,11 +27874,14 @@ typedef struct {
27873
27874
27874
27875
void (*set_method)(LuaCEmbedTable *self , const char *name, LuaCEmbedResponse *(*callback)(LuaCEmbedTable *self, LuaCEmbed *args));
27875
27876
void (*set_string_prop)(LuaCEmbedTable *self , const char *name, const char *value);
27877
+ void (*set_raw_string_prop)(LuaCEmbedTable *self , const char *name, const char *value,long size);
27878
+
27876
27879
void (*set_long_prop)(LuaCEmbedTable *self , const char *name, long long value);
27877
27880
void (*set_double_prop)(LuaCEmbedTable *self , const char *name, double value);
27878
27881
void (*set_bool_prop)(LuaCEmbedTable *self , const char *name, bool value);
27879
27882
int (*get_type_prop)(LuaCEmbedTable *self, const char *name);
27880
27883
char* (*get_string_prop)(LuaCEmbedTable *self , const char *name);
27884
+ char* (*get_raw_string_prop)(LuaCEmbedTable *self, const char *name,long *size);
27881
27885
long long (*get_long_prop)(LuaCEmbedTable *self , const char *name);
27882
27886
double (*get_double_prop)(LuaCEmbedTable *self , const char *name);
27883
27887
bool (*get_bool_prop)(LuaCEmbedTable *self , const char *name);
@@ -27895,6 +27899,8 @@ typedef struct {
27895
27899
long long (*get_long_by_index)(LuaCEmbedTable *self, int index);
27896
27900
double (*get_double_by_index)(LuaCEmbedTable *self, int index);
27897
27901
char * (*get_string_by_index)(LuaCEmbedTable *self, int index);
27902
+ char * (*get_raw_string_by_index)(LuaCEmbedTable *self, int index, long *size);
27903
+
27898
27904
bool (*get_bool_by_index)(LuaCEmbedTable *self, int index);
27899
27905
27900
27906
}LuaCembedTableModule;
@@ -28329,9 +28335,9 @@ double LuaCEmbedTable_get_double_by_index(LuaCEmbedTable *self, int index);
28329
28335
28330
28336
char * LuaCEmbedTable_get_string_by_index(LuaCEmbedTable *self, int index);
28331
28337
28332
- bool LuaCEmbedTable_get_bool_by_index(LuaCEmbedTable *self, int index);
28333
-
28338
+ char * LuaCEmbedTable_get_raw_string_by_index(LuaCEmbedTable *self, int index, long *size);
28334
28339
28340
+ bool LuaCEmbedTable_get_bool_by_index(LuaCEmbedTable *self, int index);
28335
28341
28336
28342
28337
28343
//path: src/imports/../LuaCEmbed/table/table/getters/keys/fdeclare.keys.h
@@ -28342,6 +28348,8 @@ bool LuaCEmbedTable_get_bool_by_index(LuaCEmbedTable *self, int index);
28342
28348
28343
28349
char* LuaCembedTable_get_string_prop(LuaCEmbedTable *self, const char *name);
28344
28350
28351
+ char* LuaCembedTable_get_raw_string_prop(LuaCEmbedTable *self, const char *name,long *size);
28352
+
28345
28353
long long LuaCembedTable_get_long_prop(LuaCEmbedTable *self, const char *name);
28346
28354
28347
28355
double LuaCembedTable_get_double_prop(LuaCEmbedTable *self, const char *name);
@@ -28357,6 +28365,8 @@ int LuaCEmbedTable_get_type_prop(LuaCEmbedTable *self, const char *name);
28357
28365
28358
28366
void LuaCEmbedTable_set_string_by_index(LuaCEmbedTable *self, long index, const char *value);
28359
28367
28368
+ void LuaCEmbedTable_set_raw_string_by_index(LuaCEmbedTable *self, long index, const char *value,long size);
28369
+
28360
28370
void LuaCEmbedTable_set_long_by_index(LuaCEmbedTable *self, long long index, long value);
28361
28371
28362
28372
void LuaCEmbedTable_set_double_by_index(LuaCEmbedTable *self, long index, double value);
@@ -28398,6 +28408,8 @@ void LuaCEmbedTable_set_method(LuaCEmbedTable *self, const char *name, LuaCEmbed
28398
28408
28399
28409
void LuaCEmbedTable_set_string_prop(LuaCEmbedTable *self, const char *name, const char *value);
28400
28410
28411
+ void LuaCEmbedTable_set_raw_string_prop(LuaCEmbedTable *self , const char *name, const char *value,long size);
28412
+
28401
28413
void LuaCEmbedTable_set_long_prop(LuaCEmbedTable *self, const char *name, long long value);
28402
28414
28403
28415
void LuaCEmbedTable_set_double_prop(LuaCEmbedTable *self, const char *name, double value);
@@ -28408,7 +28420,6 @@ void LuaCEmbedTable_set_bool_prop(LuaCEmbedTable *self, const char *name, bool
28408
28420
void LuaCEmbedTable_set_evaluation_prop(LuaCEmbedTable *self, const char *name, const char *code, ...);
28409
28421
28410
28422
28411
-
28412
28423
//path: src/imports/../LuaCEmbed/table/table/sub_tables/index/fdeclare.index.h
28413
28424
//mannaged by silver chain
28414
28425
@@ -30596,6 +30607,44 @@ char * LuaCEmbedTable_get_string_by_index(LuaCEmbedTable *self, int index){
30596
30607
return NULL;
30597
30608
}
30598
30609
30610
+ char * LuaCEmbedTable_get_raw_string_by_index(LuaCEmbedTable *self, int index, long *size){
30611
+ PRIVATE_LUA_CEMBED_TABLE_PROTECT_NULL
30612
+
30613
+ int formatted_index = index + LUA_CEMBED_INDEX_DIF;
30614
+
30615
+ lua_getglobal(self->main_object->state,self->global_name);
30616
+ int table_index = lua_gettop(self->main_object->state);
30617
+ long converted_index = privateLuaCEmbedTable_convert_index(self,formatted_index);
30618
+ int total = 1;
30619
+ lua_pushnil(self->main_object->state);
30620
+ while(lua_next(self->main_object->state,table_index)){
30621
+ if(total == converted_index){
30622
+ if(privateLuaCEmbedTable_ensure_type_with_index(self,converted_index,LUA_CEMBED_STRING)){
30623
+ lua_pop(self->main_object->state,1);
30624
+ PRIVATE_LUA_CEMBED_TABLE_CLEAR_STACK
30625
+ return NULL;
30626
+ }
30627
+ char * result = (char*)lua_tolstring(self->main_object->state,-1,(size_t*)size);
30628
+ lua_pop(self->main_object->state,1);
30629
+ PRIVATE_LUA_CEMBED_TABLE_CLEAR_STACK
30630
+ return result;
30631
+ }
30632
+ lua_pop(self->main_object->state,1);
30633
+ total+=1;
30634
+
30635
+ }
30636
+
30637
+ privateLuaCEmbed_raise_error_not_jumping(
30638
+ self->main_object,
30639
+ PRIVATE_LUA_CEMBED_WRONG_TYPE_INDEX,
30640
+ index,
30641
+ self->global_name,
30642
+ LuaCembed_convert_arg_code(LUA_CEMBED_NIL),
30643
+ LuaCembed_convert_arg_code(LUA_CEMBED_STRING)
30644
+ );
30645
+ PRIVATE_LUA_CEMBED_TABLE_CLEAR_STACK
30646
+ return NULL;
30647
+ }
30599
30648
bool LuaCEmbedTable_get_bool_by_index(LuaCEmbedTable *self, int index){
30600
30649
PRIVATE_LUA_CEMBED_TABLE_PROTECT_BOOL
30601
30650
@@ -30634,6 +30683,7 @@ bool LuaCEmbedTable_get_bool_by_index(LuaCEmbedTable *self, int index){
30634
30683
return LUA_CEMBED_GENERIC_ERROR;
30635
30684
}
30636
30685
30686
+
30637
30687
//path: src/imports/../LuaCEmbed/table/table/getters/keys/fdefine.keys.c
30638
30688
//mannaged by silver chain
30639
30689
@@ -30662,6 +30712,19 @@ char* LuaCembedTable_get_string_prop(LuaCEmbedTable *self , const char *name){
30662
30712
return value;
30663
30713
}
30664
30714
30715
+ char* LuaCembedTable_get_raw_string_prop(LuaCEmbedTable *self, const char *name,long *size){
30716
+ PRIVATE_LUA_CEMBED_TABLE_PROTECT_NULL
30717
+
30718
+ lua_getglobal(self->main_object->state,self->global_name);
30719
+ privateLuaCEmbd_get_field_protected(self->main_object,name);
30720
+ if(privateLuaCEmbedTable_ensure_type_with_key(self, name, LUA_CEMBED_STRING)){
30721
+ return NULL;
30722
+ }
30723
+
30724
+ char *value = (char*)lua_tolstring(self->main_object->state,-1,(size_t*)size);
30725
+ PRIVATE_LUA_CEMBED_TABLE_CLEAR_STACK
30726
+ return value;
30727
+ }
30665
30728
30666
30729
long long LuaCembedTable_get_long_prop(LuaCEmbedTable *self , const char *name){
30667
30730
PRIVATE_LUA_CEMBED_TABLE_PROTECT_NUM
@@ -30727,9 +30790,27 @@ void LuaCEmbedTable_set_string_by_index(LuaCEmbedTable *self, long index, const
30727
30790
lua_pushstring(self->main_object->state,value);
30728
30791
lua_settable(self->main_object->state,-3);
30729
30792
lua_settop(self->main_object->state, 0);
30793
+ }
30730
30794
30795
+
30796
+ void LuaCEmbedTable_set_raw_string_by_index(LuaCEmbedTable *self, long index, const char *value,long size){
30797
+ PRIVATE_LUA_CEMBED_TABLE_PROTECT_VOID
30798
+
30799
+ char *possible_key = LuaCembedTable_get_key_by_index(self,index);
30800
+ if(possible_key){
30801
+ LuaCEmbedTable_set_string_prop(self,possible_key,value);
30802
+ return;
30803
+ }
30804
+ long formatted_index = index + LUA_CEMBED_INDEX_DIF;
30805
+ lua_getglobal(self->main_object->state,self->global_name);
30806
+ lua_pushnumber(self->main_object->state,(double)formatted_index);
30807
+ lua_pushlstring(self->main_object->state,value,size);
30808
+ lua_settable(self->main_object->state,-3);
30809
+ lua_settop(self->main_object->state, 0);
30731
30810
}
30732
30811
30812
+
30813
+
30733
30814
void LuaCEmbedTable_set_long_by_index(LuaCEmbedTable *self, long long index, long value){
30734
30815
PRIVATE_LUA_CEMBED_TABLE_PROTECT_VOID
30735
30816
@@ -31004,6 +31085,16 @@ void LuaCEmbedTable_set_string_prop(LuaCEmbedTable *self , const char *name, co
31004
31085
lua_settable(self->main_object->state,-3);
31005
31086
lua_settop(self->main_object->state, 0);
31006
31087
31088
+ }
31089
+ void LuaCEmbedTable_set_raw_string_prop(LuaCEmbedTable *self , const char *name, const char *value,long size){
31090
+ PRIVATE_LUA_CEMBED_TABLE_PROTECT_VOID
31091
+
31092
+ lua_getglobal(self->main_object->state,self->global_name);
31093
+ lua_pushstring(self->main_object->state,name);
31094
+ lua_pushlstring(self->main_object->state,value,size);
31095
+ lua_settable(self->main_object->state,-3);
31096
+ lua_settop(self->main_object->state, 0);
31097
+
31007
31098
}
31008
31099
31009
31100
void LuaCEmbedTable_set_long_prop(LuaCEmbedTable *self , const char *name, long long value){
@@ -31065,6 +31156,7 @@ void LuaCEmbedTable_set_evaluation_prop(LuaCEmbedTable *self, const char *name,
31065
31156
31066
31157
}
31067
31158
31159
+
31068
31160
//path: src/imports/../LuaCEmbed/table/table/sub_tables/index/fdefine.index.c
31069
31161
//mannaged by silver chain
31070
31162
@@ -31707,7 +31799,7 @@ LuaCembedTableModule newLuaCembedTableModule(){
31707
31799
self.set_double_prop = LuaCEmbedTable_set_double_prop;
31708
31800
self.set_long_prop = LuaCEmbedTable_set_long_prop;
31709
31801
self.set_string_prop = LuaCEmbedTable_set_string_prop;
31710
-
31802
+ self.set_raw_string_prop = LuaCEmbedTable_set_raw_string_prop;
31711
31803
self.get_sub_table_prop = LuaCEmbedTable_get_sub_table_by_key;
31712
31804
self.new_sub_table_prop = LuaCEmbedTable_new_sub_table_by_key;
31713
31805
self.set_sub_table_prop = LuaCEmbedTable_set_sub_table_prop;
@@ -31718,17 +31810,18 @@ LuaCembedTableModule newLuaCembedTableModule(){
31718
31810
self.get_double_prop = LuaCembedTable_get_double_prop;
31719
31811
self.get_long_prop = LuaCembedTable_get_long_prop;
31720
31812
self.get_string_prop = LuaCembedTable_get_string_prop;
31813
+ self.get_raw_string_prop= LuaCembedTable_get_raw_string_prop;
31721
31814
self.get_type_prop = LuaCEmbedTable_get_type_prop;
31722
31815
self.destroy_prop = LuaCembedTable_destroy_prop;
31723
31816
31724
31817
self.set_long_by_index = LuaCEmbedTable_set_long_by_index;
31725
31818
self.set_bool_by_index= LuaCEmbedTable_set_bool_by_index;
31726
31819
self.set_double_by_index =LuaCEmbedTable_set_double_by_index;
31727
31820
self.set_string_by_index = LuaCEmbedTable_set_string_by_index;
31821
+ self.set_raw_string_by_index = LuaCEmbedTable_set_raw_string_by_index;
31728
31822
self.set_evaluation_by_index = LuaCEmbedTable_set_evaluation_by_index;
31729
31823
31730
31824
self.get_listable_size = LuaCEmbedTable_get_listable_size;
31731
-
31732
31825
self.new_sub_table_appending = LuaCEmbedTable_new_sub_table_appending;
31733
31826
self.has_key = LuaCembedTable_has_key_at_index;
31734
31827
self.get_key_by_index = LuaCembedTable_get_key_by_index;
@@ -31738,6 +31831,7 @@ LuaCembedTableModule newLuaCembedTableModule(){
31738
31831
self.get_double_by_index = LuaCEmbedTable_get_double_by_index;
31739
31832
self.get_bool_by_index = LuaCEmbedTable_get_bool_by_index;
31740
31833
self.get_string_by_index= LuaCEmbedTable_get_string_by_index;
31834
+ self.get_raw_string_by_index =LuaCEmbedTable_get_raw_string_by_index;
31741
31835
self.get_sub_table_by_index = LuaCEmbedTable_get_sub_table_by_index;
31742
31836
return self;
31743
31837
}
0 commit comments