Skip to content

Commit

Permalink
上传luapatch
Browse files Browse the repository at this point in the history
  • Loading branch information
黄剑 authored and 黄剑 committed Mar 13, 2020
0 parents commit 6271236
Show file tree
Hide file tree
Showing 842 changed files with 96,972 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 gopep9

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions LuaPatch/LPEngine.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
//
// LPEngine.h
// luaPatch
//
// Created by 黄钊 on 2019/3/28.
// Copyright © 2019 hz. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <JavaScriptCore/JavaScriptCore.h>

struct lua_State;
typedef struct lua_State lua_State;

typedef enum{
LPBoxingTypePoint,//普通指针
// LPBoxingTypeString,//指向字符串的指针
}LPBoxingType;

//盒子类型
@interface LPBoxing : NSObject
@property LPBoxingType type;
@property void *pointer;
- (void *)unboxPointer;
@end


//向外部暴露接口,单元测试要调用
id callSelector(NSString *className, NSString *selectorName,NSArray *arguments,id instance,BOOL isSuper);

id callLuaMethodImplement(NSString *luaFunctionName,id instance,NSString *className,NSArray *paramList,char returnValueType);

//这个库加载的接口
int luaopen_luapatch_core(lua_State *L);
Loading

0 comments on commit 6271236

Please sign in to comment.