这篇教程C++ DumpVar函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DumpVar函数的典型用法代码示例。如果您正苦于以下问题:C++ DumpVar函数的具体用法?C++ DumpVar怎么用?C++ DumpVar使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DumpVar函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: DumpStringstatic void DumpString(const killa_TString* s, DumpState* D){ if (s==NULL) { size_t size=0; DumpVar(size,D); } else { size_t size=s->tsv.len+1; /* include trailing '/0' */ DumpVar(size,D); DumpBlock(killa_getstr(s),size*sizeof(char),D); }}
开发者ID:caivega,项目名称:Killa,代码行数:14,
示例2: DumpStringstatic void DumpString(const LuaString* s, DumpState* D){ if (s==NULL) { size_t size=0; DumpVar(size,D); } else { size_t size=s->getLen()+1; /* include trailing '/0' */ DumpVar(size,D); DumpBlock(s->c_str(),size*sizeof(char),D); }}
开发者ID:aappleby,项目名称:Lumina,代码行数:14,
示例3: DumpStringstatic void DumpString(const TString* s, DumpState* D){ if (s==NULL || getstr(s)==NULL) { size_t size=0; DumpVar(size,D); } else { size_t size=s->tsv.len+1; /* include trailing '/0' */ DumpVar(size,D); DumpBlock(getstr(s),size,D); }}
开发者ID:catyguan,项目名称:gamedev.platform,代码行数:14,
示例4: DumpStringstatic void DumpString(const TString* s, DumpState* D){ if (s==NULL || getstr(s)==NULL) { // LOOM: This was using size_t whereas the LoadString in undump is using in32_t, this // will break bytecode compiled under 64 bit int32_t size=0; DumpVar(size,D); } else { // LOOM: This was using size_t whereas the LoadString in undump is using in32_t, this // will break bytecode compiled under 64 bit int32_t size=s->tsv.len+1; /* include trailing '/0' */ DumpVar(size,D); DumpBlock(getstr(s),size,D); }}
开发者ID:24BitGames,项目名称:LoomSDK,代码行数:18,
示例5: DumpNumberstatic void DumpNumber(lua_Number x, DumpState* D){#if defined( LUA_NUMBER_INTEGRAL ) && !defined( LUA_CROSS_COMPILER ) DumpIntWithSize(x,D->target.sizeof_lua_Number,D);#else // #if defined( LUA_NUMBER_INTEGRAL ) && !defined( LUA_CROSS_COMPILER ) if (D->target.lua_Number_integral) { if (((float)(int)x)!=x) D->status=LUA_ERR_CC_NOTINTEGER; DumpIntWithSize(x,D->target.sizeof_lua_Number,D); } else { switch(D->target.sizeof_lua_Number) { /* do we need bounds checking? */ case 4: { float y=x; MaybeByteSwap((char*)&y,4,D); DumpVar(y,D); } break; case 8: { double y=x; // ARM FPA mode: keep endianness, but swap high and low parts of the // memory representation. This is the default compilation mode for ARM // targets with non-EABI gcc if(D->target.is_arm_fpa) { char *pnum=(char*)&y, temp[4]; memcpy(temp,pnum,4); memcpy(pnum,pnum+4,4); memcpy(pnum+4,temp,4); } MaybeByteSwap((char*)&y,8,D); DumpVar(y,D); } break; default: lua_assert(0); } }#endif // #if defined( LUA_NUMBER_INTEGRAL ) && !defined( LUA_CROSS_COMPILER )}
开发者ID:01org,项目名称:incubator-mynewt-core,代码行数:40,
示例6: DumpWStringstatic void DumpWString(TString* s, DumpState* D){ if (s==NULL || getwstr(s)==NULL) { size_t size=0; DumpVar(size,D); } else { size_t size=s->tsv.len+1; /* include trailing '/0' */ DumpVector(getwstr(s),size,2,D); }}
开发者ID:LTears,项目名称:rktotal,代码行数:13,
示例7: DumpStringstatic void DumpString (const TString *s, DumpState *D) { if (s == NULL) DumpByte(0, D); else { size_t size = s->len + 1; /* include trailing '/0' */ if (size < 0xFF) DumpByte(cast_int(size), D); else { DumpByte(0xFF, D); DumpVar(size, D); } DumpVector(getstr(s), size - 1, D); /* no need to save '/0' */ }}
开发者ID:141141,项目名称:nodemcu-firmware-lua5.3.0,代码行数:14,
示例8: DumpSizestatic void DumpSize(uint32_t x, DumpState* D){ /* dump unsigned integer */ switch(D->target.sizeof_strsize_t) { case 1: { if (x>0xFF) D->status=LUA_ERR_CC_INTOVERFLOW; DumpChar(x,D); } break; case 2: { if (x>0xFFFF) D->status=LUA_ERR_CC_INTOVERFLOW; uint16_t y=(uint16_t)x; MaybeByteSwap((char*)&y,2,D); DumpVar(y,D); } break; case 4: { /* Reduce bounds to avoid messing 32-bit compilers up */ if (x>0xFFFFFFFE) D->status=LUA_ERR_CC_INTOVERFLOW; uint32_t y=x; MaybeByteSwap((char*)&y,4,D); DumpVar(y,D); } break; default: lua_assert(0); }}
开发者ID:01org,项目名称:incubator-mynewt-core,代码行数:24,
示例9: DumpIntWithSizestatic void DumpIntWithSize(int x, int sizeof_int, DumpState* D){ /* dump signed integer */ switch(sizeof_int) { case 1: { if (x>0x7F || x<(-0x80)) D->status=LUA_ERR_CC_INTOVERFLOW; DumpChar(x,D); } break; case 2: { if (x>0x7FFF || x<(-0x8000)) D->status=LUA_ERR_CC_INTOVERFLOW; int16_t y=(int16_t)x; MaybeByteSwap((char*)&y,2,D); DumpVar(y,D); } break; case 4: { /* Need to reduce bounds by 1 to avoid messing 32-bit compilers up */ if (x>0x7FFFFFFE || x<(-0x7FFFFFFF)) D->status=LUA_ERR_CC_INTOVERFLOW; int32_t y=(int32_t)x; MaybeByteSwap((char*)&y,4,D); DumpVar(y,D); } break; default: lua_assert(0); }}
开发者ID:01org,项目名称:incubator-mynewt-core,代码行数:24,
示例10: DumpIntegerstatic void DumpInteger (lua_Integer x, DumpState *D) { DumpVar(x, D);}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:3,
示例11: DumpNumberstatic void DumpNumber (lua_Number x, DumpState *D) { DumpVar(x, D);}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:3,
示例12: DumpIntstatic void DumpInt (int x, DumpState *D) { DumpVar(x, D);}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:3,
示例13: DumpBytestatic void DumpByte (int y, DumpState *D) { lu_byte x = (lu_byte)y; DumpVar(x, D);}
开发者ID:ezEngine,项目名称:ezEngine,代码行数:4,
示例14: DumpCharstatic void DumpChar(int y, DumpState* D){ char x=(char)y; DumpVar(x,D);}
开发者ID:luiseduardohdbackup,项目名称:lua4wince,代码行数:5,
示例15: DumpNumberstatic void DumpNumber(ktap_number x, DumpState *D){ DumpVar(x,D);}
开发者ID:atmark-techno,项目名称:linux-3.14-at,代码行数:4,
示例16: DumpIntstatic void DumpInt(int x, DumpState* D){ int32_t i = x; DumpVar(i,D);}
开发者ID:1085075003,项目名称:quick-cocos2d-x,代码行数:5,
示例17: DumpNumberstatic void DumpNumber(double x, DumpState* D){ DumpVar(x,D);}
开发者ID:aappleby,项目名称:Lumina,代码行数:4,
注:本文中的DumpVar函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ DupStr函数代码示例 C++ DumpString函数代码示例 |