111
This commit is contained in:
@@ -11,7 +11,9 @@ class Memory {
|
||||
}
|
||||
|
||||
function allocUtf8String(Str) {
|
||||
return NativePointer(Str_Ptr(Str));
|
||||
local P = NativePointer(Str_Ptr(Str));
|
||||
P.Size = Str.len();
|
||||
return P;
|
||||
}
|
||||
|
||||
function copy(P1, P2, Size) {
|
||||
@@ -26,6 +28,8 @@ class Memory {
|
||||
}
|
||||
|
||||
class NativePointer extends Base_C_Object {
|
||||
//大小
|
||||
Size = -1;
|
||||
|
||||
function _tyoeof()
|
||||
{
|
||||
@@ -35,6 +39,7 @@ class NativePointer extends Base_C_Object {
|
||||
constructor(T) {
|
||||
if (typeof T == "integer") {
|
||||
base.constructor(Sq_New_Point(T));
|
||||
Size = T;
|
||||
//注册销毁伪析构
|
||||
Register_Destruction(C_Object, this);
|
||||
} else if (typeof T == "userdata") {
|
||||
|
||||
Reference in New Issue
Block a user