Skip to content

Commit b05e92c

Browse files
committed
include
1 parent 2a48144 commit b05e92c

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

backend/Python/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ target_sources(ScriptX PRIVATE
22
${CMAKE_CURRENT_LIST_DIR}/PyEngine.cc
33
${CMAKE_CURRENT_LIST_DIR}/PyEngine.h
44
${CMAKE_CURRENT_LIST_DIR}/PyException.cc
5+
${CMAKE_CURRENT_LIST_DIR}/PyHelper.h
6+
${CMAKE_CURRENT_LIST_DIR}/PyHelper.hpp
7+
${CMAKE_CURRENT_LIST_DIR}/PyHelper.cc
58
${CMAKE_CURRENT_LIST_DIR}/PyLocalReference.cc
69
${CMAKE_CURRENT_LIST_DIR}/PyNative.cc
710
${CMAKE_CURRENT_LIST_DIR}/PyNative.hpp

backend/Python/PyHelper.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making ScriptX available.
3+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include "PyHelper.hpp"

backend/Python/PyHelper.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making ScriptX available.
3+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#pragma once
19+
20+
#include "../../src/foundation.h"
21+
22+
// docs: https://docs.python.org/3/c-api/index.html
23+
24+
SCRIPTX_BEGIN_INCLUDE_LIBRARY
25+
#ifndef PY_SSIZE_T_CLEAN
26+
#define PY_SSIZE_T_CLEAN
27+
#endif
28+
#include <Python.h>
29+
SCRIPTX_END_INCLUDE_LIBRARY
30+
31+
namespace script::py_backend {}

backend/Python/PyHelper.hpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Tencent is pleased to support the open source community by making ScriptX available.
3+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#pragma once
19+
#include "PyHelper.h"
20+
21+
namespace script::py_backend {}

0 commit comments

Comments
 (0)