@@ -3642,35 +3642,6 @@ static int LUACALL wxLua_wxMemoryBuffer_AppendData(lua_State *L)
3642
3642
return 0 ;
3643
3643
}
3644
3644
3645
- static wxLuaArgType s_wxluatypeArray_wxLua_wxMemoryBuffer_Byte[] = { &wxluatype_wxMemoryBuffer, &wxluatype_TNUMBER, &wxluatype_TINTEGER, NULL };
3646
- static int LUACALL wxLua_wxMemoryBuffer_Byte (lua_State *L);
3647
- static wxLuaBindCFunc s_wxluafunc_wxLua_wxMemoryBuffer_Byte[1 ] = {{ wxLua_wxMemoryBuffer_Byte, WXLUAMETHOD_METHOD, 2 , 3 , s_wxluatypeArray_wxLua_wxMemoryBuffer_Byte }};
3648
- // %override wxLua_wxMemoryBuffer_Byte
3649
- // unsigned char Byte(int index, size_t length = 1);
3650
- static int LUACALL wxLua_wxMemoryBuffer_Byte (lua_State *L)
3651
- {
3652
- // int index
3653
- int index = (int )wxlua_getnumbertype (L, 2 );
3654
- // get this
3655
- wxMemoryBuffer * self = (wxMemoryBuffer *)wxluaT_getuserdatatype (L, 1 , wxluatype_wxMemoryBuffer);
3656
- // int length (optional)
3657
- int length = 1 ;
3658
- if (lua_gettop (L) >= 3 )
3659
- length = (size_t )wxlua_getnumbertype (L, 3 );
3660
- if (index + length > self->GetDataLen ())
3661
- length = self->GetDataLen () - index ;
3662
- if (index < 0 || length <= 0 )
3663
- return 0 ;
3664
- int count = 0 ;
3665
- while (count < length) {
3666
- unsigned char returns = ((unsigned char *)(self->GetData ()))[index + count];
3667
- lua_pushnumber (L, returns);
3668
- count++;
3669
- }
3670
- return length;
3671
- }
3672
-
3673
-
3674
3645
3675
3646
#if (wxCHECK_VERSION(2,9,4)) && (wxLUA_USE_wxMemoryBuffer)
3676
3647
static wxLuaArgType s_wxluatypeArray_wxLua_wxMemoryBuffer_Clear[] = { &wxluatype_wxMemoryBuffer, NULL };
@@ -3757,6 +3728,35 @@ if ((double)(lua_Integer)returns == (double)returns) {
3757
3728
return 1 ;
3758
3729
}
3759
3730
3731
+ static wxLuaArgType s_wxluatypeArray_wxLua_wxMemoryBuffer_GetByte[] = { &wxluatype_wxMemoryBuffer, &wxluatype_TNUMBER, &wxluatype_TINTEGER, NULL };
3732
+ static int LUACALL wxLua_wxMemoryBuffer_GetByte (lua_State *L);
3733
+ static wxLuaBindCFunc s_wxluafunc_wxLua_wxMemoryBuffer_GetByte[1 ] = {{ wxLua_wxMemoryBuffer_GetByte, WXLUAMETHOD_METHOD, 2 , 3 , s_wxluatypeArray_wxLua_wxMemoryBuffer_GetByte }};
3734
+ // %override wxLua_wxMemoryBuffer_GetByte
3735
+ // unsigned char GetByte(int index, size_t length = 1);
3736
+ static int LUACALL wxLua_wxMemoryBuffer_GetByte (lua_State *L)
3737
+ {
3738
+ // int index
3739
+ int index = (int )wxlua_getnumbertype (L, 2 );
3740
+ // get this
3741
+ wxMemoryBuffer * self = (wxMemoryBuffer *)wxluaT_getuserdatatype (L, 1 , wxluatype_wxMemoryBuffer);
3742
+ // int length (optional)
3743
+ int length = 1 ;
3744
+ if (lua_gettop (L) >= 3 )
3745
+ length = (size_t )wxlua_getnumbertype (L, 3 );
3746
+ if (index + length > self->GetDataLen ())
3747
+ length = self->GetDataLen () - index ;
3748
+ if (index < 0 || length <= 0 )
3749
+ return 0 ;
3750
+ int count = 0 ;
3751
+ while (count < length) {
3752
+ unsigned char returns = ((unsigned char *)(self->GetData ()))[index + count];
3753
+ lua_pushnumber (L, returns);
3754
+ count++;
3755
+ }
3756
+ return length;
3757
+ }
3758
+
3759
+
3760
3760
static wxLuaArgType s_wxluatypeArray_wxLua_wxMemoryBuffer_GetData[] = { &wxluatype_wxMemoryBuffer, NULL };
3761
3761
static int LUACALL wxLua_wxMemoryBuffer_GetData (lua_State *L);
3762
3762
static wxLuaBindCFunc s_wxluafunc_wxLua_wxMemoryBuffer_GetData[1 ] = {{ wxLua_wxMemoryBuffer_GetData, WXLUAMETHOD_METHOD, 1 , 1 , s_wxluatypeArray_wxLua_wxMemoryBuffer_GetData }};
@@ -4008,7 +4008,6 @@ void wxLua_wxMemoryBuffer_delete_function(void** p)
4008
4008
wxLuaBindMethod wxMemoryBuffer_methods[] = {
4009
4009
{ " AppendByte" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_AppendByte, 1 , NULL },
4010
4010
{ " AppendData" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_AppendData, 1 , NULL },
4011
- { " Byte" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_Byte, 1 , NULL },
4012
4011
4013
4012
#if (wxCHECK_VERSION(2,9,4)) && (wxLUA_USE_wxMemoryBuffer)
4014
4013
{ " Clear" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_Clear, 1 , NULL },
@@ -4017,6 +4016,7 @@ wxLuaBindMethod wxMemoryBuffer_methods[] = {
4017
4016
{ " Fill" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_Fill, 1 , NULL },
4018
4017
{ " GetAppendBuf" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetAppendBuf, 1 , NULL },
4019
4018
{ " GetBufSize" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetBufSize, 1 , NULL },
4019
+ { " GetByte" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetByte, 1 , NULL },
4020
4020
{ " GetData" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetData, 1 , NULL },
4021
4021
{ " GetDataLen" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetDataLen, 1 , NULL },
4022
4022
{ " GetWriteBuf" , WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxMemoryBuffer_GetWriteBuf, 1 , NULL },
0 commit comments