-
-
[原创]cython逆向-语言特性分析
-
发表于: 2024-6-21 21:12 8921
-
之前遇到的很多python题目逆向都是pyc的逆向比较简单,最近遇到了很多cython的题目,但是不太清楚原理做的就很难受,这里就想梳理一下cython的原理
这里引自官方文档:
Cython - an overview — Cython 3.1.0a0 documentation
Cython是一种编程语言,可以编写 C 扩展 对于 Python 语言来说,就像 Python 本身一样简单 它旨在成为 语言的超集,赋予它高级, 面向对象、函数式和动态编程。
主要的 Python 执行环境通常称为 CPython用 C 语言编写的。 其他主要实现使用 Java 和 Python 本身 。
它的主要特点 :
Cython 项目最初基于著名的 [Pyrex Pyrex] 已经通过源代码编译器解决了这个问题 将 Python 代码转换为等效的 C 代码
特性:
与大多数 Python 软件不同,Cython 需要在系统上存在 C 编译器
GNU C 编译器(gcc)通常存在,或通过包系统轻松获得
在 Ubuntu 或 Debian 命令:
木有apple,所以自己官网看
https://developer.apple .com /
使用开源 MinGW(Windows 的 gcc 分发版)
解压缩 tarball 或 zip 文件,输入目录
再运行
跟着无名侠仙贝学习Cython Reverse - Pandaos's blog (panda0s.top)
Cython 有一个个功能可以将 Python 编译成 C语言实现,再由 GCC/Clang 将 C 编译成动态库
build的源码:
annotate=True
选项可以生成一个 html 页面
==显示 Py源码与生成的C代码的对应关系==
build命令:
成功后在当前目录下找到对应的动态库与对应的 xxx.c 源文件
==直接用 python import 导入==
版本: Python 3.7.6,Cython 0.29.21
在pyx文件编译为.c的文件时,__pyx_string_tab是一个包含代码中所有需要使用的字符串(避免重复创建相同的字符串,从而优化字符串的使用和查找)
__pyx_string_tab将字符串与PyObject联系,再调用
__Pyx_InitStrings初始化字符串对象(详解__Pyx_InitStrings使用)
C++ __Pyx_InitStrings函数代码示例 - 纯净天空 (vimsky.com)
在逆向时,可以通过这个特性快速找到对应的project
我在审计的时候发现了__Pyx_StringTabEntry结构体,发现和前面的__pyx_string_tab数组有点关系分析一下
如下:
cython代码大致结构
完整的实现
在模块初始化过程中,Cython 会调用一个函数(如 __Pyx_InitStrings
),使用 __pyx_string_tab
来初始化所有字符串常量,
然后这个函数遍历 __pyx_string_tab
,初始化每个字符串条目,并将字符串对象的指针存储在相应的结构体字段中
整数常量的构造涉及将 Python 代码中的整数常量转换为 C 代码中的相应表示形式。这包括处理各种整数类型(如短整型、整型、长整型和超长整型)以及确保在生成的 C 代码中正确初始化和使用这些常量
在cython是可以直接引用
但是转化为c代码时,类似于(简化版本)
超出 C 的基本整数类型范围的整数,Cython 使用 Python 的 PyLong
类型来表示
例如:
转换
整数属于全局变量,在 __Pyx_InitGlobals
中初始化
这个函数对应于 Python 定义的函数 test_arg(x, y, z)
,它在 Cython 中被编译成如下形式:
在 Cython 编译过程中,这个 Python 函数被转换为 C 函数,形式如下:
通常在 Cython 中用作占位符,因为函数没有 self`参数
对应于 Python 函数参数 x, y, z`的 C 对象
这个函数对应于一个类方法 test_class.test_class_hh,其 Python 定义如下:
在 Cython 编译过程中,这个类方法被转换为 C 函数,形式如下:
通常在 Cython 中用作占位符,因为方法没有 self参数
对应于 Python 方法中的 self参数的 C 对象
字符串常量 __pyx_kp_s_This_is_myfunc1被初始化为 "This is myfunc1."
创建包含该字符串的元组:
前面我们提到了回收站机制,这里详细解释cython中严格处理的回收站的机制
引用计数:
标记-清除(Mark and Sweep):
转换为cython代码
这里关于def函数的定义比较冗杂,简单看看就行
这里关于def的函数定义就不再解析了,大体差不多
主要解析这里引用字符串和调用print的函数
__builtin__是cython中的一个内置模块:
包含所有的内置对象,函数,异常,常量(提供一组标准的内置对象,会自动加载的这个模块,不会在用户处显示的导入),比如
函数:print,len,range
异常:Exception,TyprError
常量:none,true,false
查看这个地方构造元组的汇编
分析cython的实现
详细说明:
这个地方的4是指比较操作符的代码,gpt的解释有问题,这里在官方文档中找到关于他的使用
简单来说就是一个比较函数,返回一个布尔值(异常返回-1,结果为假0,为真返回1)
第三个参数的op为6种比较操作符之一
从一个序列(如列表、元组或字符串)中提取一个子序列
通过__Pyx_PyObject_GetSlice辅助函数
__pyx_v_x
: 这是需要进行切片操作的 Python 对象
2
: 这是切片操作的起始索引。即,从索引 2
开始进行切片
0
: 这是切片操作的结束索引(0一般表示切片一直进行到对象的末尾)
&__pyx_slice__4代表一个包含切片信息的 PyObject,实际相当于 slice(2, None)
start: 切片开始的索引(包括)
stop: 切片结束的索引(不包括)
step: 步长,表示从 start 到 stop 之间每隔多少个元素取一个
示例:
索引访问只能获取单个元素,而不能获取多个元素或子序列
源码
对照源码分析
对照源码分析
对照源码分析
格式化字符串的汇编实现
动态调用 Python/C API 中的函数来实现在运行时获取 PyObject 指针对应的字符串表示形式的 UTF-8 dump 信息
==根据python将对象转换为UTF-8字符串的汇编实现,编译frida的脚本==
脚本实现
sudo apt
-
get install build
-
essential
sudo apt
-
get install build
-
essential
pip install Cython
pip install Cython
python setup.py install
python setup.py install
pip install cython setuptools
pip install cython setuptools
from
setuptools
import
setup
from
Cython.Build
import
cythonize
setup(
ext_modules
=
cythonize(
"hello.pyx"
, annotate
=
True
)
)
from
setuptools
import
setup
from
Cython.Build
import
cythonize
setup(
ext_modules
=
cythonize(
"hello.pyx"
, annotate
=
True
)
)
python setup.py build_ext
-
-
inplace
python setup.py build_ext
-
-
inplace
import datetime
import math
def myfunc1():
print(
"This is myfunc1."
)
def test_variables():
# 定义局部变量并打印
x = 5
y =
"variables test."
print(x)
print(y)
def test_strVar():
# 定义字符串变量并打印
x =
"Hello world."
print(x)
def test_global_var():
# 使用全局变量 gy 并打印
global gy
print(gy)
def test_cast():
# 类型转换:将整数和字符串进行类型转换并打印
x =
int
(5)
y = str(3)
print(x, y)
def test_numbers():
# 打印整数、浮点数和大整数(十六进制)
x = 123
y = 12.3
z = 0x112233445566778899AABBCCDD
print(x, y, z)
def test_if(x):
# 条件语句:判断 x 是否大于 456
if
x > 456:
print(
"x > 456"
)
else
:
print(
"x <= 456"
)
def test_string():
# 字符串操作:获取长度、索引、切片,并检查子字符串
x =
"I am str."
y = len(x)
z = x[1]
w = x[2:]
print(x, y, z, w)
if
"am"
in x:
print(
"yes"
)
else
:
print(
"wrong"
)
def test_list():
# 列表操作:添加元素、遍历、切片和替换部分元素
x = list()
x.append(1)
x.append(2)
x.append(3)
x.append(4)
x.append(
"five"
)
print(x)
print(len(x))
for
i in x:
print(i)
x = x[1:]
x[2:4] = [22, 33]
def test_dict():
# 字典操作:添加键值对、访问值、检查键和遍历字典
x = {}
x[
"one"
] = 1
x[
"two"
] = 2
x[
"three"
] = 3
y = x[
"one"
]
z = x[
"two"
]
if
"one"
in x:
print(y)
for
k in x:
print(k, x[k])
def test_for():
# for 循环:计算 0 到 100 的和
s = 0
for
i in range(101):
s = s + i
print(s)
def test_while():
# while 循环:计算 1 到 100 的和
s = 0
i = 1
while
i <= 100:
s = s + i
i += 1
print(s)
def test_exception():
# 异常处理:尝试执行错误操作并捕获异常
x = 1
try
:
x = x +
"1"
print(x)
except NameError:
print(
"Variable x is not defined"
)
except:
print(
"Something else went wrong"
)
def test_datetime():
# 获取并打印当前日期和时间
x = datetime.datetime.now()
print(x)
def test_format():
# 字符串格式化:使用 % 操作符进行字符串格式化
x = 1
y =
"One"
z =
"%s is %d"
% (y, x)
print(z)
def test_math():
# 数学函数:使用 ceil 和 floor 函数
x = math.
ceil
(1.4)
y = math.
floor
(1.4)
print(x) # 返回 2
print(y) # 返回 1
def test_arg(x, y, z):
# 传递参数:修改参数并打印
x = x + 1
y = y +
"2"
z = z[:]
print(x, y, z)
class
test_class:
# 定义一个类及其方法
def __init__(self):
self.aa = 1
def test_class_hh(self):
print(self.aa)
# 定义全局变量并调用所有函数
gy = 123
myfunc1()
test_variables()
test_strVar()
test_global_var()
test_cast()
test_numbers()
test_string()
test_list()
test_dict()
test_for()
test_while()
test_exception()
test_datetime()
test_format()
test_math()
test_arg(1,
"2"
, [4, 5, 6])
import datetime
import math
def myfunc1():
print(
"This is myfunc1."
)
def test_variables():
# 定义局部变量并打印
x = 5
y =
"variables test."
print(x)
print(y)
def test_strVar():
# 定义字符串变量并打印
x =
"Hello world."
print(x)
def test_global_var():
# 使用全局变量 gy 并打印
global gy
print(gy)
def test_cast():
# 类型转换:将整数和字符串进行类型转换并打印
x =
int
(5)
y = str(3)
print(x, y)
def test_numbers():
# 打印整数、浮点数和大整数(十六进制)
x = 123
y = 12.3
z = 0x112233445566778899AABBCCDD
print(x, y, z)
def test_if(x):
# 条件语句:判断 x 是否大于 456
if
x > 456:
print(
"x > 456"
)
else
:
print(
"x <= 456"
)
def test_string():
# 字符串操作:获取长度、索引、切片,并检查子字符串
x =
"I am str."
y = len(x)
z = x[1]
w = x[2:]
print(x, y, z, w)
if
"am"
in x:
print(
"yes"
)
else
:
print(
"wrong"
)
def test_list():
# 列表操作:添加元素、遍历、切片和替换部分元素
x = list()
x.append(1)
x.append(2)
x.append(3)
x.append(4)
x.append(
"five"
)
print(x)
print(len(x))
for
i in x:
print(i)
x = x[1:]
x[2:4] = [22, 33]
def test_dict():
# 字典操作:添加键值对、访问值、检查键和遍历字典
x = {}
x[
"one"
] = 1
x[
"two"
] = 2
x[
"three"
] = 3
y = x[
"one"
]
z = x[
"two"
]
if
"one"
in x:
print(y)
for
k in x:
print(k, x[k])
def test_for():
# for 循环:计算 0 到 100 的和
s = 0
for
i in range(101):
s = s + i
print(s)
def test_while():
# while 循环:计算 1 到 100 的和
s = 0
i = 1
while
i <= 100:
s = s + i
i += 1
print(s)
def test_exception():
# 异常处理:尝试执行错误操作并捕获异常
x = 1
try
:
x = x +
"1"
print(x)
except NameError:
print(
"Variable x is not defined"
)
except:
print(
"Something else went wrong"
)
def test_datetime():
# 获取并打印当前日期和时间
x = datetime.datetime.now()
print(x)
def test_format():
# 字符串格式化:使用 % 操作符进行字符串格式化
x = 1
y =
"One"
z =
"%s is %d"
% (y, x)
print(z)
def test_math():
# 数学函数:使用 ceil 和 floor 函数
x = math.
ceil
(1.4)
y = math.
floor
(1.4)
print(x) # 返回 2
print(y) # 返回 1
def test_arg(x, y, z):
# 传递参数:修改参数并打印
x = x + 1
y = y +
"2"
z = z[:]
print(x, y, z)
class
test_class:
# 定义一个类及其方法
def __init__(self):
self.aa = 1
def test_class_hh(self):
print(self.aa)
# 定义全局变量并调用所有函数
gy = 123
myfunc1()
test_variables()
test_strVar()
test_global_var()
test_cast()
test_numbers()
test_string()
test_list()
test_dict()
test_for()
test_while()
test_exception()
test_datetime()
test_format()
test_math()
test_arg(1,
"2"
, [4, 5, 6])
static
int
__Pyx_CreateStringTabAndInitStrings(
void
) {
__Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_1, __pyx_k_1,
sizeof
(__pyx_k_1), 0, 0, 1, 0},
{&__pyx_kp_s_2, __pyx_k_2,
sizeof
(__pyx_k_2), 0, 0, 1, 0},
{&__pyx_kp_s_Hello_world, __pyx_k_Hello_world,
sizeof
(__pyx_k_Hello_world), 0, 0, 1, 0},
{&__pyx_kp_s_I_am_str, __pyx_k_I_am_str,
sizeof
(__pyx_k_I_am_str), 0, 0, 1, 0},
{&__pyx_n_s_NameError, __pyx_k_NameError,
sizeof
(__pyx_k_NameError), 0, 0, 1, 1},
{&__pyx_n_s_One, __pyx_k_One,
sizeof
(__pyx_k_One), 0, 0, 1, 1},
{&__pyx_kp_s_Something_else_went_wrong, __pyx_k_Something_else_went_wrong,
sizeof
(__pyx_k_Something_else_went_wrong), 0, 0, 1, 0},
{&__pyx_kp_s_This_is_myfunc1, __pyx_k_This_is_myfunc1,
sizeof
(__pyx_k_This_is_myfunc1), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_x_is_not_defined, __pyx_k_Variable_x_is_not_defined,
sizeof
(__pyx_k_Variable_x_is_not_defined), 0, 0, 1, 0},
{&__pyx_n_s__10, __pyx_k__10,
sizeof
(__pyx_k__10), 0, 0, 1, 1},
{&__pyx_n_s__38, __pyx_k__38,
sizeof
(__pyx_k__38), 0, 0, 1, 1},
{&__pyx_n_s_aa, __pyx_k_aa,
sizeof
(__pyx_k_aa), 0, 0, 1, 1},
{&__pyx_n_s_am, __pyx_k_am,
sizeof
(__pyx_k_am), 0, 0, 1, 1},
{&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines,
sizeof
(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
{&__pyx_n_s_ceil, __pyx_k_ceil,
sizeof
(__pyx_k_ceil), 0, 0, 1, 1},
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof
(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_n_s_datetime, __pyx_k_datetime,
sizeof
(__pyx_k_datetime), 0, 0, 1, 1},
{&__pyx_n_s_dict, __pyx_k_dict,
sizeof
(__pyx_k_dict), 0, 0, 1, 1},
{&__pyx_n_s_doc, __pyx_k_doc,
sizeof
(__pyx_k_doc), 0, 0, 1, 1},
{&__pyx_n_s_five, __pyx_k_five,
sizeof
(__pyx_k_five), 0, 0, 1, 1},
{&__pyx_n_s_floor, __pyx_k_floor,
sizeof
(__pyx_k_floor), 0, 0, 1, 1},
{&__pyx_n_s_gy, __pyx_k_gy,
sizeof
(__pyx_k_gy), 0, 0, 1, 1},
{&__pyx_n_s_hello, __pyx_k_hello,
sizeof
(__pyx_k_hello), 0, 0, 1, 1},
{&__pyx_kp_s_hello_pyx, __pyx_k_hello_pyx,
sizeof
(__pyx_k_hello_pyx), 0, 0, 1, 0},
{&__pyx_n_s_i, __pyx_k_i,
sizeof
(__pyx_k_i), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import,
sizeof
(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_init, __pyx_k_init,
sizeof
(__pyx_k_init), 0, 0, 1, 1},
{&__pyx_n_s_init_subclass, __pyx_k_init_subclass,
sizeof
(__pyx_k_init_subclass), 0, 0, 1, 1},
{&__pyx_n_s_initializing, __pyx_k_initializing,
sizeof
(__pyx_k_initializing), 0, 0, 1, 1},
{&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine,
sizeof
(__pyx_k_is_coroutine), 0, 0, 1, 1},
{&__pyx_n_s_k, __pyx_k_k,
sizeof
(__pyx_k_k), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main,
sizeof
(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_math, __pyx_k_math,
sizeof
(__pyx_k_math), 0, 0, 1, 1},
{&__pyx_n_s_metaclass, __pyx_k_metaclass,
sizeof
(__pyx_k_metaclass), 0, 0, 1, 1},
{&__pyx_n_s_module, __pyx_k_module,
sizeof
(__pyx_k_module), 0, 0, 1, 1},
{&__pyx_n_s_myfunc1, __pyx_k_myfunc1,
sizeof
(__pyx_k_myfunc1), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name,
sizeof
(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_now, __pyx_k_now,
sizeof
(__pyx_k_now), 0, 0, 1, 1},
{&__pyx_n_s_one, __pyx_k_one,
sizeof
(__pyx_k_one), 0, 0, 1, 1},
{&__pyx_n_s_prepare, __pyx_k_prepare,
sizeof
(__pyx_k_prepare), 0, 0, 1, 1},
{&__pyx_n_s_print, __pyx_k_print,
sizeof
(__pyx_k_print), 0, 0, 1, 1},
{&__pyx_n_s_qualname, __pyx_k_qualname,
sizeof
(__pyx_k_qualname), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range,
sizeof
(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_s, __pyx_k_s,
sizeof
(__pyx_k_s), 0, 0, 1, 1},
{&__pyx_kp_s_s_is_d, __pyx_k_s_is_d,
sizeof
(__pyx_k_s_is_d), 0, 0, 1, 0},
{&__pyx_n_s_self, __pyx_k_self,
sizeof
(__pyx_k_self), 0, 0, 1, 1},
{&__pyx_n_s_set_name, __pyx_k_set_name,
sizeof
(__pyx_k_set_name), 0, 0, 1, 1},
{&__pyx_n_s_spec, __pyx_k_spec,
sizeof
(__pyx_k_spec), 0, 0, 1, 1},
{&__pyx_n_s_super, __pyx_k_super,
sizeof
(__pyx_k_super), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test,
sizeof
(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_test_arg, __pyx_k_test_arg,
sizeof
(__pyx_k_test_arg), 0, 0, 1, 1},
{&__pyx_n_s_test_cast, __pyx_k_test_cast,
sizeof
(__pyx_k_test_cast), 0, 0, 1, 1},
{&__pyx_n_s_test_class, __pyx_k_test_class,
sizeof
(__pyx_k_test_class), 0, 0, 1, 1},
{&__pyx_n_s_test_class___init, __pyx_k_test_class___init,
sizeof
(__pyx_k_test_class___init), 0, 0, 1, 1},
{&__pyx_n_s_test_class_hh, __pyx_k_test_class_hh,
sizeof
(__pyx_k_test_class_hh), 0, 0, 1, 1},
{&__pyx_n_s_test_class_test_class_hh, __pyx_k_test_class_test_class_hh,
sizeof
(__pyx_k_test_class_test_class_hh), 0, 0, 1, 1},
{&__pyx_n_s_test_datetime, __pyx_k_test_datetime,
sizeof
(__pyx_k_test_datetime), 0, 0, 1, 1},
{&__pyx_n_s_test_dict, __pyx_k_test_dict,
sizeof
(__pyx_k_test_dict), 0, 0, 1, 1},
{&__pyx_n_s_test_exception, __pyx_k_test_exception,
sizeof
(__pyx_k_test_exception), 0, 0, 1, 1},
{&__pyx_n_s_test_for, __pyx_k_test_for,
sizeof
(__pyx_k_test_for), 0, 0, 1, 1},
{&__pyx_n_s_test_format, __pyx_k_test_format,
sizeof
(__pyx_k_test_format), 0, 0, 1, 1},
{&__pyx_n_s_test_global_var, __pyx_k_test_global_var,
sizeof
(__pyx_k_test_global_var), 0, 0, 1, 1},
{&__pyx_n_s_test_if, __pyx_k_test_if,
sizeof
(__pyx_k_test_if), 0, 0, 1, 1},
{&__pyx_n_s_test_list, __pyx_k_test_list,
sizeof
(__pyx_k_test_list), 0, 0, 1, 1},
{&__pyx_n_s_test_math, __pyx_k_test_math,
sizeof
(__pyx_k_test_math), 0, 0, 1, 1},
{&__pyx_n_s_test_numbers, __pyx_k_test_numbers,
sizeof
(__pyx_k_test_numbers), 0, 0, 1, 1},
{&__pyx_n_s_test_strVar, __pyx_k_test_strVar,
sizeof
(__pyx_k_test_strVar), 0, 0, 1, 1},
{&__pyx_n_s_test_string, __pyx_k_test_string,
sizeof
(__pyx_k_test_string), 0, 0, 1, 1},
{&__pyx_n_s_test_variables, __pyx_k_test_variables,
sizeof
(__pyx_k_test_variables), 0, 0, 1, 1},
{&__pyx_n_s_test_while, __pyx_k_test_while,
sizeof
(__pyx_k_test_while), 0, 0, 1, 1},
{&__pyx_n_s_three, __pyx_k_three,
sizeof
(__pyx_k_three), 0, 0, 1, 1},
{&__pyx_n_s_two, __pyx_k_two,
sizeof
(__pyx_k_two), 0, 0, 1, 1},
{&__pyx_kp_s_variables_test, __pyx_k_variables_test,
sizeof
(__pyx_k_variables_test), 0, 0, 1, 0},
{&__pyx_n_s_w, __pyx_k_w,
sizeof
(__pyx_k_w), 0, 0, 1, 1},
{&__pyx_n_s_wrong, __pyx_k_wrong,
sizeof
(__pyx_k_wrong), 0, 0, 1, 1},
{&__pyx_n_s_x, __pyx_k_x,
sizeof
(__pyx_k_x), 0, 0, 1, 1},
{&__pyx_kp_s_x_456, __pyx_k_x_456,
sizeof
(__pyx_k_x_456), 0, 0, 1, 0},
{&__pyx_kp_s_x_456_2, __pyx_k_x_456_2,
sizeof
(__pyx_k_x_456_2), 0, 0, 1, 0},
{&__pyx_n_s_y, __pyx_k_y,
sizeof
(__pyx_k_y), 0, 0, 1, 1},
{&__pyx_n_s_yes, __pyx_k_yes,
sizeof
(__pyx_k_yes), 0, 0, 1, 1},
{&__pyx_n_s_z, __pyx_k_z,
sizeof
(__pyx_k_z), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
return
__Pyx_InitStrings(__pyx_string_tab);
static
int
__Pyx_CreateStringTabAndInitStrings(
void
) {
__Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_kp_s_1, __pyx_k_1,
sizeof
(__pyx_k_1), 0, 0, 1, 0},
{&__pyx_kp_s_2, __pyx_k_2,
sizeof
(__pyx_k_2), 0, 0, 1, 0},
{&__pyx_kp_s_Hello_world, __pyx_k_Hello_world,
sizeof
(__pyx_k_Hello_world), 0, 0, 1, 0},
{&__pyx_kp_s_I_am_str, __pyx_k_I_am_str,
sizeof
(__pyx_k_I_am_str), 0, 0, 1, 0},
{&__pyx_n_s_NameError, __pyx_k_NameError,
sizeof
(__pyx_k_NameError), 0, 0, 1, 1},
{&__pyx_n_s_One, __pyx_k_One,
sizeof
(__pyx_k_One), 0, 0, 1, 1},
{&__pyx_kp_s_Something_else_went_wrong, __pyx_k_Something_else_went_wrong,
sizeof
(__pyx_k_Something_else_went_wrong), 0, 0, 1, 0},
{&__pyx_kp_s_This_is_myfunc1, __pyx_k_This_is_myfunc1,
sizeof
(__pyx_k_This_is_myfunc1), 0, 0, 1, 0},
{&__pyx_kp_s_Variable_x_is_not_defined, __pyx_k_Variable_x_is_not_defined,
sizeof
(__pyx_k_Variable_x_is_not_defined), 0, 0, 1, 0},
{&__pyx_n_s__10, __pyx_k__10,
sizeof
(__pyx_k__10), 0, 0, 1, 1},
{&__pyx_n_s__38, __pyx_k__38,
sizeof
(__pyx_k__38), 0, 0, 1, 1},
{&__pyx_n_s_aa, __pyx_k_aa,
sizeof
(__pyx_k_aa), 0, 0, 1, 1},
{&__pyx_n_s_am, __pyx_k_am,
sizeof
(__pyx_k_am), 0, 0, 1, 1},
{&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines,
sizeof
(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
{&__pyx_n_s_ceil, __pyx_k_ceil,
sizeof
(__pyx_k_ceil), 0, 0, 1, 1},
{&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback,
sizeof
(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
{&__pyx_n_s_datetime, __pyx_k_datetime,
sizeof
(__pyx_k_datetime), 0, 0, 1, 1},
{&__pyx_n_s_dict, __pyx_k_dict,
sizeof
(__pyx_k_dict), 0, 0, 1, 1},
{&__pyx_n_s_doc, __pyx_k_doc,
sizeof
(__pyx_k_doc), 0, 0, 1, 1},
{&__pyx_n_s_five, __pyx_k_five,
sizeof
(__pyx_k_five), 0, 0, 1, 1},
{&__pyx_n_s_floor, __pyx_k_floor,
sizeof
(__pyx_k_floor), 0, 0, 1, 1},
{&__pyx_n_s_gy, __pyx_k_gy,
sizeof
(__pyx_k_gy), 0, 0, 1, 1},
{&__pyx_n_s_hello, __pyx_k_hello,
sizeof
(__pyx_k_hello), 0, 0, 1, 1},
{&__pyx_kp_s_hello_pyx, __pyx_k_hello_pyx,
sizeof
(__pyx_k_hello_pyx), 0, 0, 1, 0},
{&__pyx_n_s_i, __pyx_k_i,
sizeof
(__pyx_k_i), 0, 0, 1, 1},
{&__pyx_n_s_import, __pyx_k_import,
sizeof
(__pyx_k_import), 0, 0, 1, 1},
{&__pyx_n_s_init, __pyx_k_init,
sizeof
(__pyx_k_init), 0, 0, 1, 1},
{&__pyx_n_s_init_subclass, __pyx_k_init_subclass,
sizeof
(__pyx_k_init_subclass), 0, 0, 1, 1},
{&__pyx_n_s_initializing, __pyx_k_initializing,
sizeof
(__pyx_k_initializing), 0, 0, 1, 1},
{&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine,
sizeof
(__pyx_k_is_coroutine), 0, 0, 1, 1},
{&__pyx_n_s_k, __pyx_k_k,
sizeof
(__pyx_k_k), 0, 0, 1, 1},
{&__pyx_n_s_main, __pyx_k_main,
sizeof
(__pyx_k_main), 0, 0, 1, 1},
{&__pyx_n_s_math, __pyx_k_math,
sizeof
(__pyx_k_math), 0, 0, 1, 1},
{&__pyx_n_s_metaclass, __pyx_k_metaclass,
sizeof
(__pyx_k_metaclass), 0, 0, 1, 1},
{&__pyx_n_s_module, __pyx_k_module,
sizeof
(__pyx_k_module), 0, 0, 1, 1},
{&__pyx_n_s_myfunc1, __pyx_k_myfunc1,
sizeof
(__pyx_k_myfunc1), 0, 0, 1, 1},
{&__pyx_n_s_name, __pyx_k_name,
sizeof
(__pyx_k_name), 0, 0, 1, 1},
{&__pyx_n_s_now, __pyx_k_now,
sizeof
(__pyx_k_now), 0, 0, 1, 1},
{&__pyx_n_s_one, __pyx_k_one,
sizeof
(__pyx_k_one), 0, 0, 1, 1},
{&__pyx_n_s_prepare, __pyx_k_prepare,
sizeof
(__pyx_k_prepare), 0, 0, 1, 1},
{&__pyx_n_s_print, __pyx_k_print,
sizeof
(__pyx_k_print), 0, 0, 1, 1},
{&__pyx_n_s_qualname, __pyx_k_qualname,
sizeof
(__pyx_k_qualname), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range,
sizeof
(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_s, __pyx_k_s,
sizeof
(__pyx_k_s), 0, 0, 1, 1},
{&__pyx_kp_s_s_is_d, __pyx_k_s_is_d,
sizeof
(__pyx_k_s_is_d), 0, 0, 1, 0},
{&__pyx_n_s_self, __pyx_k_self,
sizeof
(__pyx_k_self), 0, 0, 1, 1},
{&__pyx_n_s_set_name, __pyx_k_set_name,
sizeof
(__pyx_k_set_name), 0, 0, 1, 1},
{&__pyx_n_s_spec, __pyx_k_spec,
sizeof
(__pyx_k_spec), 0, 0, 1, 1},
{&__pyx_n_s_super, __pyx_k_super,
sizeof
(__pyx_k_super), 0, 0, 1, 1},
{&__pyx_n_s_test, __pyx_k_test,
sizeof
(__pyx_k_test), 0, 0, 1, 1},
{&__pyx_n_s_test_arg, __pyx_k_test_arg,
sizeof
(__pyx_k_test_arg), 0, 0, 1, 1},
{&__pyx_n_s_test_cast, __pyx_k_test_cast,
sizeof
(__pyx_k_test_cast), 0, 0, 1, 1},
{&__pyx_n_s_test_class, __pyx_k_test_class,
sizeof
(__pyx_k_test_class), 0, 0, 1, 1},
{&__pyx_n_s_test_class___init, __pyx_k_test_class___init,
sizeof
(__pyx_k_test_class___init), 0, 0, 1, 1},
{&__pyx_n_s_test_class_hh, __pyx_k_test_class_hh,
sizeof
(__pyx_k_test_class_hh), 0, 0, 1, 1},
{&__pyx_n_s_test_class_test_class_hh, __pyx_k_test_class_test_class_hh,
sizeof
(__pyx_k_test_class_test_class_hh), 0, 0, 1, 1},
{&__pyx_n_s_test_datetime, __pyx_k_test_datetime,
sizeof
(__pyx_k_test_datetime), 0, 0, 1, 1},
{&__pyx_n_s_test_dict, __pyx_k_test_dict,
sizeof
(__pyx_k_test_dict), 0, 0, 1, 1},
{&__pyx_n_s_test_exception, __pyx_k_test_exception,
sizeof
(__pyx_k_test_exception), 0, 0, 1, 1},
{&__pyx_n_s_test_for, __pyx_k_test_for,
sizeof
(__pyx_k_test_for), 0, 0, 1, 1},
{&__pyx_n_s_test_format, __pyx_k_test_format,
sizeof
(__pyx_k_test_format), 0, 0, 1, 1},
{&__pyx_n_s_test_global_var, __pyx_k_test_global_var,
sizeof
(__pyx_k_test_global_var), 0, 0, 1, 1},
{&__pyx_n_s_test_if, __pyx_k_test_if,
sizeof
(__pyx_k_test_if), 0, 0, 1, 1},
{&__pyx_n_s_test_list, __pyx_k_test_list,
sizeof
(__pyx_k_test_list), 0, 0, 1, 1},
{&__pyx_n_s_test_math, __pyx_k_test_math,
sizeof
(__pyx_k_test_math), 0, 0, 1, 1},
{&__pyx_n_s_test_numbers, __pyx_k_test_numbers,
sizeof
(__pyx_k_test_numbers), 0, 0, 1, 1},
{&__pyx_n_s_test_strVar, __pyx_k_test_strVar,
sizeof
(__pyx_k_test_strVar), 0, 0, 1, 1},
{&__pyx_n_s_test_string, __pyx_k_test_string,
sizeof
(__pyx_k_test_string), 0, 0, 1, 1},
{&__pyx_n_s_test_variables, __pyx_k_test_variables,
sizeof
(__pyx_k_test_variables), 0, 0, 1, 1},
{&__pyx_n_s_test_while, __pyx_k_test_while,
sizeof
(__pyx_k_test_while), 0, 0, 1, 1},
{&__pyx_n_s_three, __pyx_k_three,
sizeof
(__pyx_k_three), 0, 0, 1, 1},
{&__pyx_n_s_two, __pyx_k_two,
sizeof
(__pyx_k_two), 0, 0, 1, 1},
{&__pyx_kp_s_variables_test, __pyx_k_variables_test,
sizeof
(__pyx_k_variables_test), 0, 0, 1, 0},
{&__pyx_n_s_w, __pyx_k_w,
sizeof
(__pyx_k_w), 0, 0, 1, 1},
{&__pyx_n_s_wrong, __pyx_k_wrong,
sizeof
(__pyx_k_wrong), 0, 0, 1, 1},
{&__pyx_n_s_x, __pyx_k_x,
sizeof
(__pyx_k_x), 0, 0, 1, 1},
{&__pyx_kp_s_x_456, __pyx_k_x_456,
sizeof
(__pyx_k_x_456), 0, 0, 1, 0},
{&__pyx_kp_s_x_456_2, __pyx_k_x_456_2,
sizeof
(__pyx_k_x_456_2), 0, 0, 1, 0},
{&__pyx_n_s_y, __pyx_k_y,
sizeof
(__pyx_k_y), 0, 0, 1, 1},
{&__pyx_n_s_yes, __pyx_k_yes,
sizeof
(__pyx_k_yes), 0, 0, 1, 1},
{&__pyx_n_s_z, __pyx_k_z,
sizeof
(__pyx_k_z), 0, 0, 1, 1},
{0, 0, 0, 0, 0, 0, 0}
};
return
__Pyx_InitStrings(__pyx_string_tab);
typedef
struct
{
const
char
*p;
/* 存储字符串对象的指针 */
const
char
*s;
/* 字符串的内容*/
Py_ssize_t n;
/* 字符串的长度*/
int
t;
/* 字符串的类型 */
int
intern;
/* Whether the string is interned or not */
} __Pyx_StringTabEntry;
typedef
struct
{
const
char
*p;
/* 存储字符串对象的指针 */
const
char
*s;
/* 字符串的内容*/
Py_ssize_t n;
/* 字符串的长度*/
int
t;
/* 字符串的类型 */
int
intern;
/* Whether the string is interned or not */
} __Pyx_StringTabEntry;
def greet():
return
"Hello, World!"
def greet():
return
"Hello, World!"
static
const
char
__pyx_k_Hello_World[] =
"Hello, World!"
;
static
__Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_Hello_World, __pyx_k_Hello_World,
sizeof
(__pyx_k_Hello_World) - 1, 0, 1},
{0, 0, 0, 0, 0}
};
static
const
char
__pyx_k_Hello_World[] =
"Hello, World!"
;
static
__Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_Hello_World, __pyx_k_Hello_World,
sizeof
(__pyx_k_Hello_World) - 1, 0, 1},
{0, 0, 0, 0, 0}
};
static
int
__Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while
(t->p) {
// 初始化字符串对象,并将其指针赋值给 t->p
t++;
}
return
0;
}
static
int
__Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while
(t->p) {
// 初始化字符串对象,并将其指针赋值给 t->p
t++;
}
return
0;
}
def example():
cdef
int
a = 10
cdef
long
b = 20
cdef
long
long
c = 30
cdef
size_t
d = 40
cdef Py_ssize_t e = 50
return
a + b + c + d + e
def example():
cdef
int
a = 10
cdef
long
b = 20
cdef
long
long
c = 30
cdef
size_t
d = 40
cdef Py_ssize_t e = 50
return
a + b + c + d + e
static
PyObject *__pyx_pf_7example(
void
) {
int
__pyx_v_a;
long
__pyx_v_b;
long
long
__pyx_v_c;
size_t
__pyx_v_d;
Py_ssize_t __pyx_v_e;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"example"
, 0);
// 初始化整数常量
__pyx_v_a = 10;
__pyx_v_b = 20;
__pyx_v_c = 30;
__pyx_v_d = 40;
__pyx_v_e = 50;
// 计算和返回结果
__pyx_r = PyInt_FromLong((__pyx_v_a + __pyx_v_b + __pyx_v_c + __pyx_v_d + __pyx_v_e));
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
static
PyObject *__pyx_pf_7example(
void
) {
int
__pyx_v_a;
long
__pyx_v_b;
long
long
__pyx_v_c;
size_t
__pyx_v_d;
Py_ssize_t __pyx_v_e;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"example"
, 0);
// 初始化整数常量
__pyx_v_a = 10;
__pyx_v_b = 20;
__pyx_v_c = 30;
__pyx_v_d = 40;
__pyx_v_e = 50;
// 计算和返回结果
__pyx_r = PyInt_FromLong((__pyx_v_a + __pyx_v_b + __pyx_v_c + __pyx_v_d + __pyx_v_e));
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
def large_int_example():
cdef
long
long
big_int = 12345678901234567890
return
big_int
def large_int_example():
cdef
long
long
big_int = 12345678901234567890
return
big_int
static
PyObject *__pyx_pf_14large_int_example(
void
) {
long
long
__pyx_v_big_int;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"large_int_example"
, 0);
// 初始化大整数常量
__pyx_v_big_int = 12345678901234567890LL;
// 返回结果
__pyx_r = PyLong_FromLongLong(__pyx_v_big_int);
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
static
PyObject *__pyx_pf_14large_int_example(
void
) {
long
long
__pyx_v_big_int;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"large_int_example"
, 0);
// 初始化大整数常量
__pyx_v_big_int = 12345678901234567890LL;
// 返回结果
__pyx_r = PyLong_FromLongLong(__pyx_v_big_int);
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
static
CYTHON_SMALL_CODE
int
__Pyx_InitConstants(
void
) {
if
(__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
__pyx_float_1_4 = PyFloat_FromDouble(1.4);
if
(unlikely(!__pyx_float_1_4)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_0 = PyInt_FromLong(0);
if
(unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_1 = PyInt_FromLong(1);
if
(unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_2 = PyInt_FromLong(2);
if
(unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_3 = PyInt_FromLong(3);
if
(unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_4 = PyInt_FromLong(4);
if
(unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_5 = PyInt_FromLong(5);
if
(unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_6 = PyInt_FromLong(6);
if
(unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_22 = PyInt_FromLong(22);
if
(unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_33 = PyInt_FromLong(33);
if
(unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_100 = PyInt_FromLong(100);
if
(unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_123 = PyInt_FromLong(123);
if
(unlikely(!__pyx_int_123)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_456 = PyInt_FromLong(456);
if
(unlikely(!__pyx_int_456)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_0x112233445566778899aabbccdd = PyInt_FromString((
char
*)
"0x112233445566778899aabbccdd"
, 0, 0);
if
(unlikely(!__pyx_int_0x112233445566778899aabbccdd)) __PYX_ERR(0, 1, __pyx_L1_error)
return
0;
__pyx_L1_error:;
return
-1;
}
static
CYTHON_SMALL_CODE
int
__Pyx_InitConstants(
void
) {
if
(__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
__pyx_float_1_4 = PyFloat_FromDouble(1.4);
if
(unlikely(!__pyx_float_1_4)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_0 = PyInt_FromLong(0);
if
(unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_1 = PyInt_FromLong(1);
if
(unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_2 = PyInt_FromLong(2);
if
(unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_3 = PyInt_FromLong(3);
if
(unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_4 = PyInt_FromLong(4);
if
(unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_5 = PyInt_FromLong(5);
if
(unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_6 = PyInt_FromLong(6);
if
(unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_22 = PyInt_FromLong(22);
if
(unlikely(!__pyx_int_22)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_33 = PyInt_FromLong(33);
if
(unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_100 = PyInt_FromLong(100);
if
(unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_123 = PyInt_FromLong(123);
if
(unlikely(!__pyx_int_123)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_456 = PyInt_FromLong(456);
if
(unlikely(!__pyx_int_456)) __PYX_ERR(0, 1, __pyx_L1_error)
__pyx_int_0x112233445566778899aabbccdd = PyInt_FromString((
char
*)
"0x112233445566778899aabbccdd"
, 0, 0);
if
(unlikely(!__pyx_int_0x112233445566778899aabbccdd)) __PYX_ERR(0, 1, __pyx_L1_error)
return
0;
__pyx_L1_error:;
return
-1;
}
static
PyObject *__pyx_pf_5hello_myfunc1(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_2test_variables(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_4test_strVar(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_6test_global_var(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_8test_cast(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_numbers(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_12test_if(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x);
/* proto */
static
PyObject *__pyx_pf_5hello_14test_string(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_16test_list(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_18test_dict(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_20test_for(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_22test_while(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_24test_exception(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_26test_datetime(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_28test_format(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_30test_math(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_32test_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_class___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_class_2test_class_hh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
/* proto */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
static
PyObject *__pyx_pf_5hello_myfunc1(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_2test_variables(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_4test_strVar(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_6test_global_var(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_8test_cast(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_numbers(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_12test_if(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x);
/* proto */
static
PyObject *__pyx_pf_5hello_14test_string(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_16test_list(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_18test_dict(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_20test_for(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_22test_while(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_24test_exception(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_26test_datetime(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_28test_format(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_30test_math(CYTHON_UNUSED PyObject *__pyx_self);
/* proto */
static
PyObject *__pyx_pf_5hello_32test_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_class___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
/* proto */
static
PyObject *__pyx_pf_5hello_10test_class_2test_class_hh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
/* proto */
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
def
test_arg(x, y, z):
# function body
def
test_arg(x, y, z):
# function body
static
PyObject *__pyx_pf_5hello_32test_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z);
static
PyObject *__pyx_pf_5hello_32test_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z);
class
test_class:
def
test_class_hh(
self
):
# method body
class
test_class:
def
test_class_hh(
self
):
# method body
static
PyObject *__pyx_pf_5hello_10test_class_2test_class_hh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
static
PyObject *__pyx_pf_5hello_10test_class_2test_class_hh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self);
04: def myfunc1():
/* Python wrapper */
static
PyObject *__pyx_pw_5hello_1myfunc1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
/*proto*/
static
PyMethodDef __pyx_mdef_5hello_1myfunc1 = {
"myfunc1"
, (PyCFunction)__pyx_pw_5hello_1myfunc1, METH_NOARGS, 0};
static
PyObject *__pyx_pw_5hello_1myfunc1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
CYTHON_UNUSED PyObject *
const
*__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"myfunc1 (wrapper)"
, 0);
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
__pyx_r = __pyx_pf_5hello_myfunc1(__pyx_self);
/* function exit code */
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
static
PyObject *__pyx_pf_5hello_myfunc1(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
/* … */
/* function exit code */
__pyx_r = Py_None; __Pyx_INCREF(Py_None);
goto
__pyx_L0;
__pyx_L1_error:;
__Pyx_XDECREF(__pyx_t_1);
__Pyx_AddTraceback(
"hello.myfunc1"
, __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
__pyx_L0:;
__Pyx_XGIVEREF(__pyx_r);
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
/* … */
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5hello_1myfunc1, 0, __pyx_n_s_myfunc1, NULL, __pyx_n_s_hello, __pyx_d, ((PyObject *)__pyx_codeobj__11));
if
(unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_2);
if
(PyDict_SetItem(__pyx_d, __pyx_n_s_myfunc1, __pyx_t_2) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* … */
__pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_hello_pyx, __pyx_n_s_myfunc1, 4, __pyx_empty_bytes);
if
(unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 4, __pyx_L1_error)
+005: print(
"This is myfunc1."
)
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple_, NULL);
if
(unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_t_1);
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
/* … */
__pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_This_is_myfunc1);
if
(unlikely(!__pyx_tuple_)) __PYX_ERR(0, 5, __pyx_L1_error)
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
006:
04: def myfunc1():
/* Python wrapper */
static
PyObject *__pyx_pw_5hello_1myfunc1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused);
/*proto*/
static
PyMethodDef __pyx_mdef_5hello_1myfunc1 = {
"myfunc1"
, (PyCFunction)__pyx_pw_5hello_1myfunc1, METH_NOARGS, 0};
static
PyObject *__pyx_pw_5hello_1myfunc1(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
CYTHON_UNUSED PyObject *
const
*__pyx_kwvalues;
PyObject *__pyx_r = 0;
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext(
"myfunc1 (wrapper)"
, 0);
__pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
__pyx_r = __pyx_pf_5hello_myfunc1(__pyx_self);
/* function exit code */
__Pyx_RefNannyFinishContext();
return
__pyx_r;
}
static
PyObject *__pyx_pf_5hello_myfunc1(CYTHON_UNUSED PyObject *__pyx_self) {
PyObject *__pyx_r = NULL;
/* … */
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
赞赏
- [原创]CAN协议分析 7563
- [原创]pwn—栈的学习 8667
- [原创]Tenda 路由器栈溢出复现(CVE-2018-18708)详解 3357
- [原创]cython逆向-语言特性分析 8922