mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add cpp support for kernal .h
This commit is contained in:
parent
553612bee2
commit
7aaeffeeb0
@ -25,6 +25,10 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _PikaObj_baseObj__H
|
||||
#define _PikaObj_baseObj__H
|
||||
#include "PikaObj.h"
|
||||
@ -36,3 +40,7 @@ PikaObj* New_BaseObj(Args* args);
|
||||
void Baseobj_print(PikaObj* self, Args* args);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_COMPILER__H
|
||||
#define __PIKA_COMPILER__H
|
||||
#include "PikaObj.h"
|
||||
@ -63,3 +67,6 @@ PIKA_RES pikafs_unpack_files(char* pack_name, char* out_path);
|
||||
PIKA_RES pikafs_pack_files(char* pack_name, int file_num, ...);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _Process__H
|
||||
#define _Process__H
|
||||
@ -664,3 +667,6 @@ int pika_GIL_EXIT(void);
|
||||
int pika_GIL_ENTER(void);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,6 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_PARSER__H
|
||||
#define __PIKA_PARSER__H
|
||||
@ -166,3 +169,7 @@ ByteCodeFrame* byteCodeFrame_appendFromAsm(ByteCodeFrame* bf, char* pikaAsm);
|
||||
uint16_t TokenStream_getSize(char* tokenStream);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -24,6 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* adapter for old api */
|
||||
#include "./pika_adapter_old_api.h"
|
||||
@ -295,3 +298,7 @@ void pika_platform_clear(void);
|
||||
pika_platform_panic_handle();
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -24,6 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_VM__H
|
||||
#define __PIKA_VM__H
|
||||
@ -371,3 +374,7 @@ typedef struct {
|
||||
} VMLocals;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,13 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PIKA_VERSION_MAJOR 1
|
||||
#define PIKA_VERSION_MINOR 12
|
||||
#define PIKA_VERSION_MICRO 0
|
||||
|
||||
#define PIKA_EDIT_TIME "2023/03/08 09:54:07"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,8 +25,16 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __TYNYOBJ__H
|
||||
#define __TYNYOBJ__H
|
||||
#include "PikaObj.h"
|
||||
PikaObj* New_TinyObj(Args* args);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -24,7 +24,6 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#undef add_filter_msg
|
||||
#undef add_filter_item
|
||||
#undef __add_filter_msg
|
||||
|
@ -72,3 +72,4 @@ add_filter_msg(bye_pika, "###bye pika", .is_case_insensitive = PIKA_TRUE)
|
||||
#if defined(__clang__)
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#include "__instruction_def.h"
|
||||
|
||||
//! just append ins to the end, insert ins would brake the pre-compiled
|
||||
|
@ -26,6 +26,9 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_OOC_H__
|
||||
#define __PIKA_OOC_H__
|
||||
@ -39,3 +42,7 @@
|
||||
#if PIKA_PLOOC_ENABLE
|
||||
#include "../pikascript-lib/PLOOC/plooc_class.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,10 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _arg__H
|
||||
#define _arg__H
|
||||
|
||||
@ -301,3 +305,7 @@ PIKA_BOOL arg_isEqual(Arg* self, Arg* other);
|
||||
Hash hash_time33EndWith(char* str, char end);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,10 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _dataArgs__H
|
||||
#define _dataArgs__H
|
||||
#include "dataArg.h"
|
||||
@ -279,3 +283,7 @@ char* args_cacheStr(Args* self, char* str);
|
||||
char* strsFormatArg(Args* out_buffs, char* fmt, Arg* arg);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,10 @@
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _link2__H
|
||||
#define _link2__H
|
||||
#include "dataLinkNode.h"
|
||||
@ -50,3 +54,7 @@ LinkNode* link_getNode(Link* self, int64_t id);
|
||||
int32_t link_getSize(Link* self);
|
||||
Link* New_link(void* args);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef _linkNode__H
|
||||
#define _linkNode__H
|
||||
|
||||
@ -40,3 +42,6 @@ void linkNode_init(LinkNode* self, void* args);
|
||||
|
||||
LinkNode* New_linkNode(void* args);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __MEMORY_H__
|
||||
#define __MEMORY_H__
|
||||
|
||||
@ -88,3 +90,6 @@ void mem_pool_init(void);
|
||||
|
||||
#undef __DATA_MEMORY_CLASS_IMPLEMENT__
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -25,7 +25,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __DATA_QUEUE__H
|
||||
#define __DATA_QUEUE__H
|
||||
#include "dataArgs.h"
|
||||
@ -84,3 +86,6 @@ uint_fast16_t byteQueue_peekAvailableCount(ByteQueue *queue);
|
||||
PIKA_BOOL byteQueue_writeOne(ByteQueue *queue, uint8_t byte);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __DATA_QUEUE_OBJ__H
|
||||
#define __DATA_QUEUE_OBJ__H
|
||||
#include "PikaObj.h"
|
||||
@ -46,3 +48,6 @@ PikaObj* queueObj_popObj(QueueObj* self);
|
||||
PikaObj* queueObj_getCurrentObj(QueueObj* self);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __DATA_STACK__H
|
||||
#define __DATA_STACK__H
|
||||
#include "dataArgs.h"
|
||||
@ -52,3 +54,6 @@ int32_t stack_popSize(Stack* stack);
|
||||
void stack_pushSize(Stack* stack, int32_t size);
|
||||
void stack_reset(Stack* stack);
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __MY_TEST_TOOLS_H
|
||||
#define __MY_TEST_TOOLS_H
|
||||
#include "PikaPlatform.h"
|
||||
@ -71,3 +73,6 @@ int strGetIndent(char* string);
|
||||
int strIsBlank(char* string);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,7 +24,9 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#ifndef __STR_ARGS__H
|
||||
#define __STR_ARGS__H
|
||||
#include "dataArgs.h"
|
||||
@ -52,3 +54,6 @@ char* strsPathJoin(Args* buffs_p, char* input1, char* input2);
|
||||
char* strsPathFormat(Args* buffs_p, char* input);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1,3 +1,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_ADAPTER_MPY_H__
|
||||
#define __PIKA_ADAPTER_MPY_H__
|
||||
#include <stdint.h>
|
||||
@ -335,3 +339,6 @@ typedef struct _mp_obj_list_t {
|
||||
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_ADAPTER_OLD_API_H__
|
||||
#define __PIKA_ADAPTER_OLD_API_H__
|
||||
|
||||
@ -83,3 +87,7 @@
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,3 +1,7 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_ADAPTER_RTT_H__
|
||||
#include <stdint.h>
|
||||
#include "PikaPlatform.h"
|
||||
@ -52,3 +56,7 @@
|
||||
#define RT_ASSERT(...) pika_assert(__VA_ARGS__)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -24,6 +24,10 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __PIKA_CFG_VALID_H__
|
||||
#define __PIKA_CFG_VALID_H__
|
||||
|
||||
@ -462,3 +466,6 @@
|
||||
/* configuration validation */
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,23 +1,25 @@
|
||||
#define __OOC_CPP__
|
||||
#define __OOC_DEBUG__
|
||||
|
||||
extern "C" {
|
||||
#include "BaseObj.h"
|
||||
#include "PikaCompiler.h"
|
||||
#include "PikaMain.h"
|
||||
#include "PikaMath_Operator.h"
|
||||
#include "PikaParser.h"
|
||||
#include "PikaStdLib_MemChecker.h"
|
||||
#include "PikaStdLib_SysObj.h"
|
||||
#include "PikaVM.h"
|
||||
#include "TinyObj.h"
|
||||
#include "dataArgs.h"
|
||||
#include "dataMemory.h"
|
||||
#include "dataStrs.h"
|
||||
|
||||
extern "C" {
|
||||
#include "PikaMain.h"
|
||||
#include "PikaMath_Operator.h"
|
||||
#include "PikaStdLib_MemChecker.h"
|
||||
#include "PikaStdLib_SysObj.h"
|
||||
#include "pikaScript.h"
|
||||
#include "pika_config_gtest.h"
|
||||
#include "pika_hal.h"
|
||||
#include <stdio.h>
|
||||
|
||||
extern PikaMemInfo g_PikaMemInfo;
|
||||
/* the log_buff of printf */
|
||||
extern char log_buff[LOG_BUFF_MAX][LOG_SIZE];
|
||||
|
Loading…
x
Reference in New Issue
Block a user