diff --git a/MANIFEST.in b/MANIFEST.in
index 3774204142..a065aceeb7 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat
+recursive-include vnpy *.ico *.ini *.dll *.so *.pyd *.h *.hpp *.cpp *.a *.dat *.pfx
diff --git a/README.md b/README.md
index 53c45634bb..855db047cd 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
-
+
@@ -44,7 +44,9 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
* 宽睿(oes):国内证券(A股)
- * 中泰XTP(xtp):国内证券(A股)
+ * 中泰XTP(xtp):国内证券(A股)、ETF期权
+
+ * 恒生期权(hsoption):ETF期权
* 华鑫奇点(tora):国内证券(A股)
@@ -54,6 +56,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
* 融航(rohon):期货资管
+ * 中汇亿达(comstar):银行间市场
+
* 海外市场
* 富途证券(futu):港股、美股
@@ -68,6 +72,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
* OANDA(oanda):外汇、CFD
+ * Alpaca(alpaca):美股(零佣金)
+
* 数字货币
* BitMEX(bitmex):数字货币期货、期权、永续合约
@@ -116,6 +122,8 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
* option_master:期权交易模块,针对国内期权市场设计,支持多种期权定价模型、隐含波动率曲面计算、希腊值风险跟踪等功能
+ * portfolio_strategy:组合策略模块,面向同时交易多合约的量化策略(Alpha、期权套利等),提供历史数据回测和实盘自动交易功能
+
* algo_trading:算法交易模块,提供多种常用的智能交易算法:TWAP、Sniper、Iceberg、BestLimit等等,支持常用算法配置保存
* script_trader:脚本策略模块,针对多标的组合类交易策略设计,同时也可以直接在命令行中实现REPL指令形式的交易,不支持回测功能
@@ -128,8 +136,6 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
* data_manager:历史数据管理模块,通过树形目录查看数据库中已有的数据概况,选择任意时间段数据查看字段细节,支持CSV文件的数据导入和导出
- * csv_loader:CSV历史数据加载器,用于加载CSV格式文件中的历史数据到平台数据库中,用于策略的回测研究以及实盘初始化等功能,支持自定义数据表头格式
-
* data_recorder:行情记录模块,基于图形界面进行配置,根据需求实时录制Tick或者K线行情到数据库中,用于策略回测或者实盘初始化
* excel_rtd:Excel RTD(Real Time Data)实时数据服务,基于pyxll模块实现在Excel中获取各类数据(行情、合约、持仓等)的实时推送更新
@@ -150,7 +156,7 @@ vn.py是一套基于Python的开源量化交易系统开发框架,于2015年1
## 环境准备
-* 推荐使用vn.py团队为量化交易专门打造的Python发行版[VNStudio-2.1.1](https://download.vnpy.com/vnstudio-2.1.1.exe),内置了最新版的vn.py框架以及VN Station量化管理平台,无需手动安装
+* 推荐使用vn.py团队为量化交易专门打造的Python发行版[VNStudio-2.1.2](https://download.vnpy.com/vnstudio-2.1.2.exe),内置了最新版的vn.py框架以及VN Station量化管理平台,无需手动安装
* 支持的系统版本:Windows 7以上/Windows Server 2008以上/Ubuntu 18.04 LTS
* 支持的Python版本:Python 3.7 64位(**注意必须是Python 3.7 64位版本**)
diff --git a/docs/csv_loader.md b/docs/csv_loader.md
deleted file mode 100644
index f23ea8b041..0000000000
--- a/docs/csv_loader.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# CSV载入模块
-
-CSV载入模块在vnpy根目录下vnpy\app\csv_loader文件夹内,engine.py里面的CsvLoaderEngine类负责载入功能实现。
-
-## 初始化配置
-初始化数据载入相关信息,可以分成3类:
-
-- CSV文件路径
-- 合约信息:合约代码、交易所、K线周期
-- CSV表头信息:日期时间、开盘价、最高价、最低价、收盘价、成交量
-
-```
- self.file_path: str = ""
-
- self.symbol: str = ""
- self.exchange: Exchange = Exchange.SSE
- self.interval: Interval = Interval.MINUTE
-
- self.datetime_head: str = ""
- self.open_head: str = ""
- self.close_head: str = ""
- self.low_head: str = ""
- self.high_head: str = ""
- self.volume_head: str = ""
-```
-以SQL数据库为例:把上期所的IF1909的历史数据插入到数据库中,那么合约代码应该填写rb1909,交易所中填写SHFE,在本地数据库中会有symbol和exchange两个键值用于索引。
-
-
-
-## 数据载入
-
-从文件路径中读取CSV文件,然后在每一次迭代中载入数据到数据库中。
-```
- with open(file_path, "rt") as f:
- reader = csv.DictReader(f)
-
- for item in reader:
-```
-
-
-
-载入数据的方法可以分成2类:
-- 直接插入:合约代码、交易所、K线周期、成交量、开盘价、最高价、最低价、收盘价、接口名称
-- 需要处理:日期时间(根据其相应的时间格式,通过strptime()转化成时间元组)、vt_symbol(合约代码.交易所格式,如rb1909.SHFE)
-
-注意:db_bar.replace()用于数据更新,即把旧的数据替换成新的。
-```
- db_bar.symbol = symbol
- db_bar.exchange = exchange.value
- db_bar.datetime = datetime.strptime(
- item[datetime_head], datetime_format
- )
- db_bar.interval = interval.value
- db_bar.volume = item[volume_head]
- db_bar.open_price = item[open_head]
- db_bar.high_price = item[high_head]
- db_bar.low_price = item[low_head]
- db_bar.close_price = item[close_head]
- db_bar.vt_symbol = vt_symbol
- db_bar.gateway_name = "DB"
-
- db_bar.replace()
-```
-
diff --git a/docs/index.rst b/docs/index.rst
index 5863db2d23..96e79c5f79 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -7,7 +7,6 @@ vn.py项目文档
introduction.md
install.md
quickstart.md
- csv_loader.md
cta_strategy.md
cta_backtester.md
data_recoder.md
diff --git a/docs/install.md b/docs/install.md
index 82b525c940..38545c6e42 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -15,7 +15,7 @@ VNStudio是vn.py团队自行打包的一键安装版本,整合了:
- vn.py框架和其他相关库
- VN Station量化工作站(vn.py框架的图形化管理工具)
-下载地址:[vnstudio-2.0.6.exe](https://download.vnpy.com/vnstudio-2.0.6.exe)
+下载地址:[vnstudio-2.1.1.exe](https://download.vnpy.com/vnstudio-2.1.1.exe)
@@ -25,7 +25,7 @@ VNStudio是vn.py团队自行打包的一键安装版本,整合了:
一路点击“下一步”即可完成VNStudio安装,安装完成后可以查看相关运行目录:
- VNStudio默认安装路径为C:\vnstudio;
-- VNStudio默认json配置文件和数据库路径为C:\Users\Administrator\.vntrader
+- VNStudio默认json配置文件和数据库路径为C:\Users\Administrator\\.vntrader
- VN Station量化工作站运行目录为C:\vnstudio\Scripts\vnstation.exe;
- vnpy运行目录在C:\vnstudio\Lib\site-packages\vnpy(进入该目录后,用户可以修改vnpy的相关功能)
diff --git a/docs/spread_trading.md b/docs/spread_trading.md
index fa240e9956..5fab908f01 100644
--- a/docs/spread_trading.md
+++ b/docs/spread_trading.md
@@ -122,7 +122,7 @@
2)成交委托监控
-- 【日志】组件显示发出买入xbt价差合约的顺序是:发出XBTZ19多头委托 -> XBTZ19委托成交 -> 发出XBTUSD空头委托 -> XBTUSD委托成交。价差交易必须遵循的逻辑是主动腿成交后,才去用被动腿来对冲头寸,并且对冲必须尽可能即使。这也为什么一般被动腿选择较为活跃合约的原因。
+- 【日志】组件显示发出买入xbt价差合约的顺序是:发出XBTZ19多头委托 -> XBTZ19委托成交 -> 发出XBTUSD空头委托 -> XBTUSD委托成交。价差交易必须遵循的逻辑是主动腿成交后,才去用被动腿来对冲头寸,并且对冲必须尽可能及时。这也为什么一般被动腿选择较为活跃合约的原因。
- 【价差】组件显示买入1手xbt价差合约成交后,【净仓】从0变成1;实际上,VN Trader【持仓】组件显示,XBTZ19合约多头持仓1手,XBTUSD合约空头持仓1手。
diff --git a/examples/portfolio_backtesting/backtesting_demo.ipynb b/examples/portfolio_backtesting/backtesting_demo.ipynb
new file mode 100644
index 0000000000..8c65e3e329
--- /dev/null
+++ b/examples/portfolio_backtesting/backtesting_demo.ipynb
@@ -0,0 +1,77 @@
+{
+ "cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#%%\n",
+ "from datetime import datetime\n",
+ "\n",
+ "from vnpy.app.portfolio_strategy import BacktestingEngine\n",
+ "from vnpy.app.portfolio_strategy.strategies.trend_following_strategy import TrendFollowingStrategy\n",
+ "from vnpy.trader.constant import Interval"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "#%%\n",
+ "engine = BacktestingEngine()\n",
+ "engine.set_parameters(\n",
+ " vt_symbols=[\"IF888.CFFEX\"],\n",
+ " interval=Interval.MINUTE,\n",
+ " start=datetime(2010, 2, 1),\n",
+ " end=datetime(2020, 4, 30),\n",
+ " rates={\"IF888.CFFEX\": 0.3/10000},\n",
+ " slippages={\"IF888.CFFEX\": 0.2},\n",
+ " sizes={\"IF888.CFFEX\": 300},\n",
+ " priceticks={\"IF888.CFFEX\": 0.2},\n",
+ " capital=1_000_000,\n",
+ ")\n",
+ "engine.add_strategy(TrendFollowingStrategy, {})"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "scrolled": false
+ },
+ "outputs": [],
+ "source": [
+ "#%%\n",
+ "engine.load_data()\n",
+ "engine.run_backtesting()\n",
+ "df = engine.calculate_result()\n",
+ "engine.calculate_statistics()\n",
+ "engine.show_chart()"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.7.4"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/examples/vn_trader/run.py b/examples/vn_trader/run.py
index 4986d513bc..d7b99bb4a5 100644
--- a/examples/vn_trader/run.py
+++ b/examples/vn_trader/run.py
@@ -24,7 +24,7 @@
# from vnpy.gateway.okexs import OkexsGateway
from vnpy.gateway.xtp import XtpGateway
# from vnpy.gateway.hbdm import HbdmGateway
-# from vnpy.gateway.tap import TapGateway
+from vnpy.gateway.tap import TapGateway
# from vnpy.gateway.tora import ToraGateway
# from vnpy.gateway.alpaca import AlpacaGateway
# from vnpy.gateway.da import DaGateway
@@ -50,7 +50,8 @@
# from vnpy.app.option_master import OptionMasterApp
# from vnpy.app.chart_wizard import ChartWizardApp
# from vnpy.app.excel_rtd import ExcelRtdApp
-from vnpy.app.data_manager import DataManagerApp
+# from vnpy.app.data_manager import DataManagerApp
+from vnpy.app.portfolio_strategy import PortfolioStrategyApp
def main():
@@ -81,7 +82,7 @@ def main():
# main_engine.add_gateway(OkexfGateway)
# main_engine.add_gateway(HbdmGateway)
main_engine.add_gateway(XtpGateway)
- # main_engine.add_gateway(TapGateway)
+ main_engine.add_gateway(TapGateway)
# main_engine.add_gateway(ToraGateway)
# main_engine.add_gateway(AlpacaGateway)
# main_engine.add_gateway(OkexsGateway)
@@ -107,8 +108,9 @@ def main():
# main_engine.add_app(OptionMasterApp)
# main_engine.add_app(ChartWizardApp)
# main_engine.add_app(ExcelRtdApp)
- main_engine.add_app(DataManagerApp)
-
+ # main_engine.add_app(DataManagerApp)
+ main_engine.add_app(PortfolioStrategyApp)
+
main_window = MainWindow(main_engine, event_engine)
main_window.showMaximized()
diff --git a/requirements.txt b/requirements.txt
index 4cb6d56d69..8b10c822ca 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
six==1.13.0
+wheel
PyQt5
pyqtgraph
dataclasses; python_version<="3.6"
diff --git a/vnpy/__init__.py b/vnpy/__init__.py
index 58039f5051..4eabd0b3fb 100644
--- a/vnpy/__init__.py
+++ b/vnpy/__init__.py
@@ -1 +1 @@
-__version__ = "2.1.1"
+__version__ = "2.1.2"
diff --git a/vnpy/api/rest/rest_client.py b/vnpy/api/rest/rest_client.py
index d84227208f..d26883eae1 100644
--- a/vnpy/api/rest/rest_client.py
+++ b/vnpy/api/rest/rest_client.py
@@ -1,34 +1,27 @@
-import json
-import logging
-import multiprocessing
-import os
import sys
import traceback
-import uuid
from datetime import datetime
from enum import Enum
from multiprocessing.dummy import Pool
-from threading import Lock, Thread
+from queue import Empty, Queue
+from typing import Any, Callable, Optional, Union, Type
from types import TracebackType
-from typing import Any, Callable, List, Optional, Type, Union
-from vnpy.trader.utility import get_file_logger
import requests
-class RequestStatus(Enum):
- ready = 0 # Request created
- success = 1 # Request successful (status code 2xx)
- failed = 2 # Request failed (status code not 2xx)
- error = 3 # Exception raised
-
-
-pool: multiprocessing.pool.Pool = Pool(os.cpu_count() * 20)
-
CALLBACK_TYPE = Callable[[dict, "Request"], Any]
ON_FAILED_TYPE = Callable[[int, "Request"], Any]
ON_ERROR_TYPE = Callable[[Type, Exception, TracebackType, "Request"], Any]
-CONNECTED_TYPE = Callable[["Request"], Any]
+
+
+class RequestStatus(Enum):
+ """"""
+
+ ready = 0 # Request created
+ success = 1 # Request successful (status code 2xx)
+ failed = 2 # Request failed (status code not 2xx)
+ error = 3 # Exception raised
class Request(object):
@@ -46,62 +39,45 @@ def __init__(
callback: CALLBACK_TYPE = None,
on_failed: ON_FAILED_TYPE = None,
on_error: ON_ERROR_TYPE = None,
- stream: bool = False,
- on_connected: CONNECTED_TYPE = None, # for streaming request
extra: Any = None,
- client: "RestClient" = None,
):
""""""
- self.method = method
- self.path = path
- self.callback = callback
- self.params = params
- self.data = data
- self.headers = headers
-
- self.stream = stream
- self.on_connected = on_connected
- self.processing_line: Optional[str] = ''
+ self.method: str = method
+ self.path: str = path
+ self.callback: CALLBACK_TYPE = callback
+ self.params: dict = params
+ self.data: Union[dict, str, bytes] = data
+ self.headers: dict = headers
- self.on_failed = on_failed
- self.on_error = on_error
- self.extra = extra
+ self.on_failed: ON_FAILED_TYPE = on_failed
+ self.on_error: ON_ERROR_TYPE = on_error
+ self.extra: Any = extra
- self.response: Optional[requests.Response] = None
- self.status = RequestStatus.ready
- self.client: "RestClient" = client
+ self.response: requests.Response = None
+ self.status: RequestStatus = RequestStatus.ready
def __str__(self):
+ """"""
if self.response is None:
status_code = "terminated"
else:
status_code = self.response.status_code
- if self.stream:
- response = self.processing_line
- else:
- if self.response is None:
- response = None
- else:
- response = self.response.text
-
return (
- "request: {method} {path} {http_code}: \n"
- "full_url: {full_url}\n"
- "status: {status}\n"
- "headers: {headers}\n"
- "params: {params}\n"
- "data: {data}\n"
- "response: {response}\n".format(
- full_url=self.client.make_full_url(self.path),
- status=self.status.name,
- method=self.method,
- path=self.path,
- http_code=status_code,
- headers=self.headers,
- params=self.params,
- data=self.data,
- response=response,
+ "request : {} {} {} because {}: \n"
+ "headers: {}\n"
+ "params: {}\n"
+ "data: {}\n"
+ "response:"
+ "{}\n".format(
+ self.method,
+ self.path,
+ self.status.name,
+ status_code,
+ self.headers,
+ self.params,
+ self.data,
+ "" if self.response is None else self.response.text,
)
)
@@ -109,134 +85,60 @@ def __str__(self):
class RestClient(object):
"""
HTTP Client designed for all sorts of trading RESTFul API.
-
* Reimplement sign function to add signature function.
* Reimplement on_failed function to handle Non-2xx responses.
* Use on_failed parameter in add_request function for individual Non-2xx response handling.
* Reimplement on_error function to handle exception msg.
"""
- class Session:
-
- def __init__(self, client: "RestClient", session: requests.Session):
- self.client = client
- self.session = session
-
- def __enter__(self):
- return self.session
-
- def __exit__(self, exc_type, exc_val, exc_tb):
- with self.client._sessions_lock:
- self.client._sessions.append(self.session)
-
def __init__(self):
- """
- """
- self.url_base = '' # type: str
- self._active = False
- self.logger: Optional[logging.Logger] = None
-
- self.proxies = None
-
- self._tasks_lock = Lock()
- self._tasks: List[multiprocessing.pool.AsyncResult] = []
- self._sessions_lock = Lock()
- self._sessions: List[requests.Session] = []
+ """"""
+ self.url_base: str = ""
+ self._active: bool = False
- self._streams_lock = Lock()
- self._streams: List[Thread] = []
+ self._queue: Queue = Queue()
+ self._pool: Pool = None
- @property
- def alive(self):
- return self._active
+ self.proxies: dict = None
- def init(self,
- url_base: str,
- proxy_host: str = "",
- proxy_port: int = 0,
- log_path: Optional[str] = None,
- ):
+ def init(
+ self,
+ url_base: str,
+ proxy_host: str = "",
+ proxy_port: int = 0
+ ) -> None:
"""
Init rest client with url_base which is the API root address.
- e.g. 'https://www.bitmex.com/api/v1/'
- :param url_base:
- :param proxy_host:
- :param proxy_port:
- :param log_path: optional. file to save log.
+ e.g. "https://www.bitmex.com/api/v1/"
"""
self.url_base = url_base
- if log_path is not None:
- self.logger = get_file_logger(log_path)
- self.logger.setLevel(logging.DEBUG)
-
if proxy_host and proxy_port:
proxy = f"{proxy_host}:{proxy_port}"
self.proxies = {"http": proxy, "https": proxy}
- def _create_session(self):
- """"""
- return requests.session()
-
- def start(self, n: int = 3):
+ def start(self, n: int = 3) -> None:
"""
Start rest client with session count n.
"""
if self._active:
return
+
self._active = True
+ self._pool = Pool(n)
+ self._pool.apply_async(self._run)
- def stop(self):
+ def stop(self) -> None:
"""
Stop rest client immediately.
"""
self._active = False
- def join(self):
+ def join(self) -> None:
"""
Wait till all requests are processed.
"""
- for task in self._tasks:
- task.wait()
-
- def add_streaming_request(
- self,
- method: str,
- path: str,
- callback: CALLBACK_TYPE,
- params: dict = None,
- data: Union[dict, str, bytes] = None,
- headers: dict = None,
- on_connected: CONNECTED_TYPE = None,
- on_failed: ON_FAILED_TYPE = None,
- on_error: ON_ERROR_TYPE = None,
- extra: Any = None,
- ):
- """
- See add_request for usage.
- """
- request = Request(
- method=method,
- path=path,
- params=params,
- data=data,
- headers=headers,
- callback=callback,
- on_failed=on_failed,
- on_error=on_error,
- extra=extra,
- client=self,
- stream=True,
- on_connected=on_connected,
- )
- # stream task should not push to thread pool
- # because it is usually no return.
- th = Thread(
- target=self._process_stream_request,
- args=[request, ],
- )
- th.start()
- return request
+ self._queue.join()
def add_request(
self,
@@ -249,63 +151,52 @@ def add_request(
on_failed: ON_FAILED_TYPE = None,
on_error: ON_ERROR_TYPE = None,
extra: Any = None,
- ):
+ ) -> Request:
"""
Add a new request.
:param method: GET, POST, PUT, DELETE, QUERY
- :param path:
+ :param path: url path for query
:param callback: callback function if 2xx status, type: (dict, Request)
:param params: dict for query string
:param data: Http body. If it is a dict, it will be converted to form-data. Otherwise, it will be converted to bytes.
:param headers: dict for headers
- :param on_failed: callback function if Non-2xx status, type, type: (code, Request)
+ :param on_failed: callback function if Non-2xx status, type, type: (code, dict, Request)
:param on_error: callback function when catching Python exception, type: (etype, evalue, tb, Request)
:param extra: Any extra data which can be used when handling callback
:return: Request
"""
request = Request(
- method=method,
- path=path,
- params=params,
- data=data,
- headers=headers,
- callback=callback,
- on_failed=on_failed,
- on_error=on_error,
- extra=extra,
- client=self,
- )
- task = pool.apply_async(
- self._process_request,
- args=[request, ],
- callback=self._clean_finished_tasks,
- # error_callback=lambda e: self.on_error(type(e), e, e.__traceback__, request),
+ method,
+ path,
+ params,
+ data,
+ headers,
+ callback,
+ on_failed,
+ on_error,
+ extra,
)
- self._push_task(task)
+ self._queue.put(request)
return request
- def _push_task(self, task):
- with self._tasks_lock:
- self._tasks.append(task)
-
- def _clean_finished_tasks(self, result: None):
- with self._tasks_lock:
- not_finished_tasks = [i for i in self._tasks if not i.ready()]
- self._tasks = not_finished_tasks
-
- def _clean_finished_streams(self):
- with self._streams_lock:
- not_finished_streams = [i for i in self._streams if i.is_alive()]
- self._streams = not_finished_streams
-
- def _get_session(self):
- with self._sessions_lock:
- if self._sessions:
- return self.Session(self, self._sessions.pop())
- else:
- return self.Session(self, self._create_session())
+ def _run(self) -> None:
+ """"""
+ try:
+ session = requests.session()
+ while self._active:
+ try:
+ request = self._queue.get(timeout=1)
+ try:
+ self._process_request(request, session)
+ finally:
+ self._queue.task_done()
+ except Empty:
+ pass
+ except Exception:
+ et, ev, tb = sys.exc_info()
+ self.on_error(et, ev, tb, None)
- def sign(self, request: Request):
+ def sign(self, request: Request) -> None:
"""
This function is called before sending any request out.
Please implement signature method here.
@@ -313,7 +204,7 @@ def sign(self, request: Request):
"""
return request
- def on_failed(self, status_code: int, request: Request):
+ def on_failed(self, status_code: int, request: Request) -> None:
"""
Default on_failed handler for Non-2xx response.
"""
@@ -325,7 +216,7 @@ def on_error(
exception_value: Exception,
tb,
request: Optional[Request],
- ):
+ ) -> None:
"""
Default on_error handler for Python exception.
"""
@@ -340,7 +231,7 @@ def exception_detail(
exception_value: Exception,
tb,
request: Optional[Request],
- ):
+ ) -> None:
text = "[{}]: Unhandled RestClient Error:{}\n".format(
datetime.now().isoformat(), exception_type
)
@@ -351,86 +242,42 @@ def exception_detail(
)
return text
- def is_request_success(self, data: dict, request: "Request"):
- """
- check if a request succeed
- default behavior is returning True
- :return True if succeed.
- """
- return True
-
- def _process_stream_request(self, request: Request):
- """
- Sending request to server and get result.
- """
- self._process_request(request)
- self._clean_finished_streams()
-
- def _log(self, msg, *args):
- logger = self.logger
- if logger:
- logger.debug(msg, *args)
-
def _process_request(
- self, request: Request
- ):
+ self, request: Request, session: requests.Session
+ ) -> None:
"""
Sending request to server and get result.
"""
try:
- with self._get_session() as session:
- request = self.sign(request)
- url = self.make_full_url(request.path)
-
- # send request
- uid = uuid.uuid4()
- stream = request.stream
- method = request.method
- headers = request.headers
- params = request.params
- data = request.data
- self._log("[%s] sending request %s %s, headers:%s, params:%s, data:%s",
- uid, method, url,
- headers, params, data)
- response = session.request(
- method,
- url,
- headers=headers,
- params=params,
- data=data,
- proxies=self.proxies,
- stream=stream,
- )
- request.response = response
- status_code = response.status_code
-
- self._log("[%s] received response from %s:%s", uid, method, url)
-
- # check result & call corresponding callbacks
- if not stream: # normal API:
- # just call callback with all contents received.
- if status_code // 100 == 2: # 2xx codes are all successful
- if status_code == 204:
- json_body = None
- else:
- json_body = response.json()
- self._process_json_body(json_body, request)
- else:
- if request.on_failed:
- request.status = RequestStatus.failed
- request.on_failed(status_code, request)
- else:
- self.on_failed(status_code, request)
- else: # streaming API:
- if request.on_connected:
- request.on_connected(request)
- # split response by lines, and call one callback for each line.
- for line in response.iter_lines(chunk_size=None):
- if line:
- request.processing_line = line
- json_body = json.loads(line)
- self._process_json_body(json_body, request)
- request.status = RequestStatus.success
+ request = self.sign(request)
+
+ url = self.make_full_url(request.path)
+
+ response = session.request(
+ request.method,
+ url,
+ headers=request.headers,
+ params=request.params,
+ data=request.data,
+ proxies=self.proxies,
+ )
+ request.response = response
+ status_code = response.status_code
+ if status_code // 100 == 2: # 2xx codes are all successful
+ if status_code == 204:
+ json_body = None
+ else:
+ json_body = response.json()
+
+ request.callback(json_body, request)
+ request.status = RequestStatus.success
+ else:
+ request.status = RequestStatus.failed
+
+ if request.on_failed:
+ request.on_failed(status_code, request)
+ else:
+ self.on_failed(status_code, request)
except Exception:
request.status = RequestStatus.error
t, v, tb = sys.exc_info()
@@ -439,22 +286,10 @@ def _process_request(
else:
self.on_error(t, v, tb, request)
- def _process_json_body(self, json_body: Optional[dict], request: "Request"):
- status_code = request.response.status_code
- if self.is_request_success(json_body, request):
- request.status = RequestStatus.success
- request.callback(json_body, request)
- else:
- request.status = RequestStatus.failed
- if request.on_failed:
- request.on_failed(status_code, request)
- else:
- self.on_failed(status_code, request)
-
- def make_full_url(self, path: str):
+ def make_full_url(self, path: str) -> str:
"""
Make relative api path into full url.
- eg: make_full_url('/get') == 'http://xxxxx/get'
+ eg: make_full_url("/get") == "http://xxxxx/get"
"""
url = self.url_base + path
return url
@@ -466,11 +301,11 @@ def request(
params: dict = None,
data: dict = None,
headers: dict = None,
- ):
+ ) -> requests.Response:
"""
Add a new request.
:param method: GET, POST, PUT, DELETE, QUERY
- :param path:
+ :param path: url path for query
:param params: dict for query string
:param data: dict for body
:param headers: dict for headers
@@ -481,8 +316,7 @@ def request(
path,
params,
data,
- headers,
- client=self,
+ headers
)
request = self.sign(request)
diff --git a/vnpy/api/t2sdk/__init__.py b/vnpy/api/t2sdk/__init__.py
new file mode 100644
index 0000000000..ec72fde1f0
--- /dev/null
+++ b/vnpy/api/t2sdk/__init__.py
@@ -0,0 +1 @@
+from . import py_t2sdk
\ No newline at end of file
diff --git a/vnpy/api/t2sdk/py_t2sdk.pyd b/vnpy/api/t2sdk/py_t2sdk.pyd
new file mode 100644
index 0000000000..2819e2aac6
Binary files /dev/null and b/vnpy/api/t2sdk/py_t2sdk.pyd differ
diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp
new file mode 100644
index 0000000000..0b41240930
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.cpp
@@ -0,0 +1,20333 @@
+/* Generated by Cython 0.29.14 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "depends": [
+ "ufx_interface.h"
+ ],
+ "include_dirs": [
+ "."
+ ],
+ "language": "c++",
+ "libraries": [
+ "t2sdk"
+ ],
+ "name": "py_t2sdk",
+ "sources": [
+ "py_t2sdk.pyx",
+ "ufx_interface.cpp"
+ ]
+ },
+ "module_name": "py_t2sdk"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+#else
+#define CYTHON_ABI "0_29_14"
+#define CYTHON_HEX_VERSION 0x001D0EF0
+#define CYTHON_FUTURE_DIVISION 0
+#include
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#define __PYX_COMMA ,
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x02070000
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+ #undef CYTHON_USE_DICT_VERSIONS
+ #define CYTHON_USE_DICT_VERSIONS 0
+ #undef CYTHON_USE_EXC_INFO_STACK
+ #define CYTHON_USE_EXC_INFO_STACK 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+ #undef CYTHON_USE_DICT_VERSIONS
+ #define CYTHON_USE_DICT_VERSIONS 0
+ #undef CYTHON_USE_EXC_INFO_STACK
+ #define CYTHON_USE_EXC_INFO_STACK 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
+ #ifndef CYTHON_USE_DICT_VERSIONS
+ #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
+ #endif
+ #ifndef CYTHON_USE_EXC_INFO_STACK
+ #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+ #ifdef SIZEOF_VOID_P
+ enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
+ #endif
+#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef __cplusplus
+ #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
+#endif
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #else
+ #define CYTHON_INLINE inline
+ #endif
+#endif
+template
+void __Pyx_call_destructor(T& x) {
+ x.~T();
+}
+template
+class __Pyx_FakeReference {
+ public:
+ __Pyx_FakeReference() : ptr(NULL) { }
+ __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { }
+ T *operator->() { return ptr; }
+ T *operator&() { return ptr; }
+ operator T&() { return *ptr; }
+ template bool operator ==(U other) { return *ptr == other; }
+ template bool operator !=(U other) { return *ptr != other; }
+ private:
+ T *ptr;
+};
+
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#else
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+#endif
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#ifndef METH_STACKLESS
+ #define METH_STACKLESS 0
+#endif
+#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
+ #define PyMem_RawMalloc(n) PyMem_Malloc(n)
+ #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
+ #define PyMem_RawFree(p) PyMem_Free(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
+#include "pythread.h"
+#define Py_tss_NEEDS_INIT 0
+typedef int Py_tss_t;
+static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
+ *key = PyThread_create_key();
+ return 0;
+}
+static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
+ Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
+ *key = Py_tss_NEEDS_INIT;
+ return key;
+}
+static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
+ PyObject_Free(key);
+}
+static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
+ return *key != Py_tss_NEEDS_INIT;
+}
+static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
+ PyThread_delete_key(*key);
+ *key = Py_tss_NEEDS_INIT;
+}
+static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
+ return PyThread_set_key_value(*key, value);
+}
+static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
+ return PyThread_get_key_value(*key);
+}
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
+#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
+#else
+#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+ #define PyObject_Unicode PyObject_Str
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#if CYTHON_ASSUME_SAFE_MACROS
+ #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
+#else
+ #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__py_t2sdk
+#define __PYX_HAVE_API__py_t2sdk
+/* Early includes */
+#include "ios"
+#include "new"
+#include "stdexcept"
+#include "typeinfo"
+#include "ufx_interface.h"
+#include
+#include
+#include
+#ifdef _OPENMP
+#include
+#endif /* _OPENMP */
+
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
+ return (size_t) i < (size_t) limit;
+}
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
+
+static PyObject *__pyx_m = NULL;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime = NULL;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "stringsource",
+ "py_t2sdk.pyx",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_8py_t2sdk_pyIF2Packer;
+struct __pyx_obj_8py_t2sdk_pyIF2UnPacker;
+struct __pyx_obj_8py_t2sdk_pyCConfigInterface;
+struct __pyx_obj_8py_t2sdk_pyIBizMessage;
+struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface;
+struct __pyx_obj_8py_t2sdk_pySubCallBack;
+struct __pyx_obj_8py_t2sdk_pySubscribeInterface;
+struct __pyx_obj_8py_t2sdk_pyCallbackInterface;
+struct __pyx_obj_8py_t2sdk_pyConnectionInterface;
+
+/* "py_t2sdk.pyx":12
+ * cdef class pyIF2UnPacker
+ *
+ * cdef class pyIF2Packer: # <<<<<<<<<<<<<<
+ * cdef c_IF2Packer* lpPacker
+ * def __cinit__(self):
+ */
+struct __pyx_obj_8py_t2sdk_pyIF2Packer {
+ PyObject_HEAD
+ c_IF2Packer *lpPacker;
+};
+
+
+/* "py_t2sdk.pyx":10
+ * from libc.stdlib cimport *
+ *
+ * cdef class pyIF2UnPacker # <<<<<<<<<<<<<<
+ *
+ * cdef class pyIF2Packer:
+ */
+struct __pyx_obj_8py_t2sdk_pyIF2UnPacker {
+ PyObject_HEAD
+ c_IF2UnPacker *lpUnpacker;
+};
+
+
+/* "py_t2sdk.pyx":209
+ * self.lpUnpacker.Release()
+ *
+ * cdef class pyCConfigInterface: # <<<<<<<<<<<<<<
+ * cdef C_CConfigInterface* lpConfig
+ * def __cinit__(self):
+ */
+struct __pyx_obj_8py_t2sdk_pyCConfigInterface {
+ PyObject_HEAD
+ C_CConfigInterface *lpConfig;
+};
+
+
+/* "py_t2sdk.pyx":243
+ * self.lpConfig.Release()
+ *
+ * cdef class pyIBizMessage: # <<<<<<<<<<<<<<
+ * cdef c_IBizMessage* lpBizMessage
+ * def __cinit__(self):
+ */
+struct __pyx_obj_8py_t2sdk_pyIBizMessage {
+ PyObject_HEAD
+ c_IBizMessage *lpBizMessage;
+};
+
+
+/* "py_t2sdk.pyx":367
+ * self.lpBizMessage.Release()
+ *
+ * cdef class pySubscribeParamInterface: # <<<<<<<<<<<<<<
+ * cdef c_CSubscribeParamInterface* lpSubscribeParam
+ * def __cinit__(self):
+ */
+struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface {
+ PyObject_HEAD
+ c_CSubscribeParamInterface *lpSubscribeParam;
+};
+
+
+/* "py_t2sdk.pyx":425
+ * return self.lpSubscribeParam.Release()
+ *
+ * cdef class pySubCallBack: # <<<<<<<<<<<<<<
+ * cdef c_SubCallBack* lpSubCallBack
+ * def __cinit__(self,str lpMould,str lpClass):
+ */
+struct __pyx_obj_8py_t2sdk_pySubCallBack {
+ PyObject_HEAD
+ c_SubCallBack *lpSubCallBack;
+};
+
+
+/* "py_t2sdk.pyx":434
+ * return self.lpSubCallBack.initInstance()
+ *
+ * cdef class pySubscribeInterface: # <<<<<<<<<<<<<<
+ * cdef c_CSubscribeInterface* lpSubcribe
+ * def __cinit__(self):
+ */
+struct __pyx_obj_8py_t2sdk_pySubscribeInterface {
+ PyObject_HEAD
+ c_CSubscribeInterface *lpSubcribe;
+};
+
+
+/* "py_t2sdk.pyx":456
+ * def Release(self):
+ * return self.lpSubcribe.Release()
+ * cdef class pyCallbackInterface: # <<<<<<<<<<<<<<
+ * cdef c_CCallbackInterface* lpCallBack
+ * def __cinit__(self,str lpMould,str lpClass):
+ */
+struct __pyx_obj_8py_t2sdk_pyCallbackInterface {
+ PyObject_HEAD
+ c_CCallbackInterface *lpCallBack;
+};
+
+
+/* "py_t2sdk.pyx":465
+ * return self.lpCallBack.InitInstance()
+ *
+ * cdef class pyConnectionInterface: # <<<<<<<<<<<<<<
+ * cdef c_CConnectionInterface* lpConnect
+ * def __cinit__(self,pyCConfigInterface pConfig):
+ */
+struct __pyx_obj_8py_t2sdk_pyConnectionInterface {
+ PyObject_HEAD
+ c_CConnectionInterface *lpConnect;
+};
+
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* KeywordStringCheck.proto */
+static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* ArgTypeTest.proto */
+#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
+ ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
+ __Pyx__ArgTypeTest(obj, type, name, exact))
+static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* bytes_index.proto */
+static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds);
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#define __Pyx_BUILD_ASSERT_EXPR(cond)\
+ (sizeof(char [1 - 2*!(cond)]) - 1)
+#ifndef Py_MEMBER_SIZE
+#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
+#endif
+ static size_t __pyx_pyframe_localsplus_offset = 0;
+ #include "frameobject.h"
+ #define __Pxy_PyFrame_Initialize_Offsets()\
+ ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
+ (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
+ #define __Pyx_PyFrame_GetLocalsplus(frame)\
+ (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
+#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* IncludeStringH.proto */
+#include
+
+/* decode_c_string_utf16.proto */
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = 0;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = -1;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
+ int byteorder = 1;
+ return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
+}
+
+/* decode_c_string.proto */
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+ const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+ const char* encoding, const char* errors,
+ PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
+
+/* PyDictVersioning.proto */
+#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
+#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
+#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
+#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
+ (version_var) = __PYX_GET_DICT_VERSION(dict);\
+ (cache_var) = (value);
+#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
+ static PY_UINT64_T __pyx_dict_version = 0;\
+ static PyObject *__pyx_dict_cached_value = NULL;\
+ if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
+ (VAR) = __pyx_dict_cached_value;\
+ } else {\
+ (VAR) = __pyx_dict_cached_value = (LOOKUP);\
+ __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
+ }\
+}
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
+static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
+#else
+#define __PYX_GET_DICT_VERSION(dict) (0)
+#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
+#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
+#endif
+
+/* GetModuleGlobalName.proto */
+#if CYTHON_USE_DICT_VERSIONS
+#define __Pyx_GetModuleGlobalName(var, name) {\
+ static PY_UINT64_T __pyx_dict_version = 0;\
+ static PyObject *__pyx_dict_cached_value = NULL;\
+ (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
+ (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
+ __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
+}
+#define __Pyx_GetModuleGlobalNameUncached(var, name) {\
+ PY_UINT64_T __pyx_dict_version;\
+ PyObject *__pyx_dict_cached_value;\
+ (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
+}
+static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
+#else
+#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
+#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
+static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
+#endif
+
+/* PyObject_GenericGetAttrNoDict.proto */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
+#else
+#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
+#endif
+
+/* PyObject_GenericGetAttr.proto */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
+#else
+#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
+#endif
+
+/* SetupReduce.proto */
+static int __Pyx_setup_reduce(PyObject* type_obj);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CppExceptionConversion.proto */
+#ifndef __Pyx_CppExn2PyErr
+#include
+#include
+#include
+#include
+static void __Pyx_CppExn2PyErr() {
+ try {
+ if (PyErr_Occurred())
+ ; // let the latest Python exn pass through and ignore the current one
+ else
+ throw;
+ } catch (const std::bad_alloc& exn) {
+ PyErr_SetString(PyExc_MemoryError, exn.what());
+ } catch (const std::bad_cast& exn) {
+ PyErr_SetString(PyExc_TypeError, exn.what());
+ } catch (const std::bad_typeid& exn) {
+ PyErr_SetString(PyExc_TypeError, exn.what());
+ } catch (const std::domain_error& exn) {
+ PyErr_SetString(PyExc_ValueError, exn.what());
+ } catch (const std::invalid_argument& exn) {
+ PyErr_SetString(PyExc_ValueError, exn.what());
+ } catch (const std::ios_base::failure& exn) {
+ PyErr_SetString(PyExc_IOError, exn.what());
+ } catch (const std::out_of_range& exn) {
+ PyErr_SetString(PyExc_IndexError, exn.what());
+ } catch (const std::overflow_error& exn) {
+ PyErr_SetString(PyExc_OverflowError, exn.what());
+ } catch (const std::range_error& exn) {
+ PyErr_SetString(PyExc_ArithmeticError, exn.what());
+ } catch (const std::underflow_error& exn) {
+ PyErr_SetString(PyExc_ArithmeticError, exn.what());
+ } catch (const std::exception& exn) {
+ PyErr_SetString(PyExc_RuntimeError, exn.what());
+ }
+ catch (...)
+ {
+ PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
+ }
+}
+#endif
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+
+/* CStringEquals.proto */
+static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'cpython.pycapsule' */
+
+/* Module declarations from 'libc.string' */
+
+/* Module declarations from 'libcpp.string' */
+
+/* Module declarations from 'libc.stdlib' */
+
+/* Module declarations from 'py_t2sdk' */
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2UnPacker = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIF2Packer = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCConfigInterface = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyIBizMessage = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeParamInterface = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubCallBack = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pySubscribeInterface = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyCallbackInterface = 0;
+static PyTypeObject *__pyx_ptype_8py_t2sdk_pyConnectionInterface = 0;
+#define __Pyx_MODULE_NAME "py_t2sdk"
+extern int __pyx_module_is_main_py_t2sdk;
+int __pyx_module_is_main_py_t2sdk = 0;
+
+/* Implementation of 'py_t2sdk' */
+static PyObject *__pyx_builtin_TypeError;
+static const char __pyx_k_S[] = "S";
+static const char __pyx_k__19[] = "*";
+static const char __pyx_k_iLen[] = "iLen";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_nAsy[] = "nAsy";
+static const char __pyx_k_name[] = "__name__";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_UTF_8[] = "UTF-8";
+static const char __pyx_k_hSend[] = "hSend";
+static const char __pyx_k_lpMsg[] = "lpMsg";
+static const char __pyx_k_utf_8[] = "utf-8";
+static const char __pyx_k_ctypes[] = "ctypes";
+static const char __pyx_k_iValue[] = "iValue";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_lpBuff[] = "lpBuff";
+static const char __pyx_k_lpData[] = "lpData";
+static const char __pyx_k_lpPack[] = "lpPack";
+static const char __pyx_k_reduce[] = "__reduce__";
+static const char __pyx_k_uiFlag[] = "uiFlag";
+static const char __pyx_k_iLength[] = "iLength";
+static const char __pyx_k_lpClass[] = "lpClass";
+static const char __pyx_k_lpMould[] = "lpMould";
+static const char __pyx_k_nAppLen[] = "nAppLen";
+static const char __pyx_k_pConfig[] = "pConfig";
+static const char __pyx_k_szEntry[] = "szEntry";
+static const char __pyx_k_szValue[] = "szValue";
+static const char __pyx_k_encoding[] = "encoding";
+static const char __pyx_k_getstate[] = "__getstate__";
+static const char __pyx_k_iDefault[] = "iDefault";
+static const char __pyx_k_iTimeOut[] = "iTimeOut";
+static const char __pyx_k_lpUnPack[] = "lpUnPack";
+static const char __pyx_k_nBuffLen[] = "nBuffLen";
+static const char __pyx_k_setstate[] = "__setstate__";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_bAsyError[] = "bAsyError";
+static const char __pyx_k_lpAppdata[] = "lpAppdata";
+static const char __pyx_k_lpContent[] = "lpContent";
+static const char __pyx_k_lpKeyData[] = "lpKeyData";
+static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
+static const char __pyx_k_szDefault[] = "szDefault";
+static const char __pyx_k_szSection[] = "szSection";
+static const char __pyx_k_uiTimeout[] = "uiTimeout";
+static const char __pyx_k_cFieldType[] = "cFieldType";
+static const char __pyx_k_filterName[] = "filterName";
+static const char __pyx_k_lpSubParam[] = "lpSubParam";
+static const char __pyx_k_filterValue[] = "filterValue";
+static const char __pyx_k_iFieldScale[] = "iFieldScale";
+static const char __pyx_k_iFieldWidth[] = "iFieldWidth";
+static const char __pyx_k_iReturnCode[] = "iReturnCode";
+static const char __pyx_k_lppCallback[] = "lppCallback";
+static const char __pyx_k_pyIF2Packer[] = "pyIF2Packer";
+static const char __pyx_k_szFieldName[] = "szFieldName";
+static const char __pyx_k_SubScribeName[] = "SubScribeName";
+static const char __pyx_k_pyIBizMessage[] = "pyIBizMessage";
+static const char __pyx_k_pyIF2UnPacker[] = "pyIF2UnPacker";
+static const char __pyx_k_pySubCallBack[] = "pySubCallBack";
+static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
+static const char __pyx_k_szDatasetName[] = "szDatasetName";
+static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
+static const char __pyx_k_pyCConfigInterface[] = "pyCConfigInterface";
+static const char __pyx_k_pyCallbackInterface[] = "pyCallbackInterface";
+static const char __pyx_k_pySubscribeInterface[] = "pySubscribeInterface";
+static const char __pyx_k_pyConnectionInterface[] = "pyConnectionInterface";
+static const char __pyx_k_pySubscribeParamInterface[] = "pySubscribeParamInterface";
+static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
+static PyObject *__pyx_n_s_S;
+static PyObject *__pyx_n_s_SubScribeName;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_kp_s_UTF_8;
+static PyObject *__pyx_n_s__19;
+static PyObject *__pyx_n_s_bAsyError;
+static PyObject *__pyx_n_s_cFieldType;
+static PyObject *__pyx_n_s_cline_in_traceback;
+static PyObject *__pyx_n_s_ctypes;
+static PyObject *__pyx_n_s_encoding;
+static PyObject *__pyx_n_s_filterName;
+static PyObject *__pyx_n_s_filterValue;
+static PyObject *__pyx_n_s_getstate;
+static PyObject *__pyx_n_s_hSend;
+static PyObject *__pyx_n_s_iDefault;
+static PyObject *__pyx_n_s_iFieldScale;
+static PyObject *__pyx_n_s_iFieldWidth;
+static PyObject *__pyx_n_s_iLen;
+static PyObject *__pyx_n_s_iLength;
+static PyObject *__pyx_n_s_iReturnCode;
+static PyObject *__pyx_n_s_iTimeOut;
+static PyObject *__pyx_n_s_iValue;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_lpAppdata;
+static PyObject *__pyx_n_s_lpBuff;
+static PyObject *__pyx_n_s_lpClass;
+static PyObject *__pyx_n_s_lpContent;
+static PyObject *__pyx_n_s_lpData;
+static PyObject *__pyx_n_s_lpKeyData;
+static PyObject *__pyx_n_s_lpMould;
+static PyObject *__pyx_n_s_lpMsg;
+static PyObject *__pyx_n_s_lpPack;
+static PyObject *__pyx_n_s_lpSubParam;
+static PyObject *__pyx_n_s_lpUnPack;
+static PyObject *__pyx_n_s_lppCallback;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_nAppLen;
+static PyObject *__pyx_n_s_nAsy;
+static PyObject *__pyx_n_s_nBuffLen;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
+static PyObject *__pyx_n_s_pConfig;
+static PyObject *__pyx_n_s_pyCConfigInterface;
+static PyObject *__pyx_n_s_pyCallbackInterface;
+static PyObject *__pyx_n_s_pyConnectionInterface;
+static PyObject *__pyx_n_s_pyIBizMessage;
+static PyObject *__pyx_n_s_pyIF2Packer;
+static PyObject *__pyx_n_s_pyIF2UnPacker;
+static PyObject *__pyx_n_s_pySubCallBack;
+static PyObject *__pyx_n_s_pySubscribeInterface;
+static PyObject *__pyx_n_s_pySubscribeParamInterface;
+static PyObject *__pyx_n_s_reduce;
+static PyObject *__pyx_n_s_reduce_cython;
+static PyObject *__pyx_n_s_reduce_ex;
+static PyObject *__pyx_n_s_setstate;
+static PyObject *__pyx_n_s_setstate_cython;
+static PyObject *__pyx_n_s_szDatasetName;
+static PyObject *__pyx_n_s_szDefault;
+static PyObject *__pyx_n_s_szEntry;
+static PyObject *__pyx_n_s_szFieldName;
+static PyObject *__pyx_n_s_szSection;
+static PyObject *__pyx_n_s_szValue;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_uiFlag;
+static PyObject *__pyx_n_s_uiTimeout;
+static PyObject *__pyx_kp_s_utf_8;
+static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */
+static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+/* Late includes */
+
+/* "py_t2sdk.pyx":14
+ * cdef class pyIF2Packer:
+ * cdef c_IF2Packer* lpPacker
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpPacker = new c_IF2Packer()
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_11pyIF2Packer___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ c_IF2Packer *__pyx_t_1;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":15
+ * cdef c_IF2Packer* lpPacker
+ * def __cinit__(self):
+ * self.lpPacker = new c_IF2Packer() # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * del self.lpPacker
+ */
+ try {
+ __pyx_t_1 = new c_IF2Packer();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 15, __pyx_L1_error)
+ }
+ __pyx_v_self->lpPacker = __pyx_t_1;
+
+ /* "py_t2sdk.pyx":14
+ * cdef class pyIF2Packer:
+ * cdef c_IF2Packer* lpPacker
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpPacker = new c_IF2Packer()
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":16
+ * def __cinit__(self):
+ * self.lpPacker = new c_IF2Packer()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpPacker
+ * def BeginPack(self):
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_11pyIF2Packer_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":17
+ * self.lpPacker = new c_IF2Packer()
+ * def __dealloc__(self):
+ * del self.lpPacker # <<<<<<<<<<<<<<
+ * def BeginPack(self):
+ * self.lpPacker.BeginPack()
+ */
+ delete __pyx_v_self->lpPacker;
+
+ /* "py_t2sdk.pyx":16
+ * def __cinit__(self):
+ * self.lpPacker = new c_IF2Packer()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpPacker
+ * def BeginPack(self):
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":18
+ * def __dealloc__(self):
+ * del self.lpPacker
+ * def BeginPack(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.BeginPack()
+ * def NewDataset(self,str szDatasetName, int iReturnCode):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("BeginPack (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_4BeginPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("BeginPack", 0);
+
+ /* "py_t2sdk.pyx":19
+ * del self.lpPacker
+ * def BeginPack(self):
+ * self.lpPacker.BeginPack() # <<<<<<<<<<<<<<
+ * def NewDataset(self,str szDatasetName, int iReturnCode):
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ */
+ __pyx_v_self->lpPacker->BeginPack();
+
+ /* "py_t2sdk.pyx":18
+ * def __dealloc__(self):
+ * del self.lpPacker
+ * def BeginPack(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.BeginPack()
+ * def NewDataset(self,str szDatasetName, int iReturnCode):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":20
+ * def BeginPack(self):
+ * self.lpPacker.BeginPack()
+ * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<<
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szDatasetName = 0;
+ int __pyx_v_iReturnCode;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("NewDataset (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szDatasetName,&__pyx_n_s_iReturnCode,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDatasetName)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iReturnCode)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, 1); __PYX_ERR(1, 20, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewDataset") < 0)) __PYX_ERR(1, 20, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_szDatasetName = ((PyObject*)values[0]);
+ __pyx_v_iReturnCode = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("NewDataset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 20, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 20, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szDatasetName, __pyx_v_iReturnCode);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_6NewDataset(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szDatasetName, int __pyx_v_iReturnCode) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("NewDataset", 0);
+
+ /* "py_t2sdk.pyx":21
+ * self.lpPacker.BeginPack()
+ * def NewDataset(self,str szDatasetName, int iReturnCode):
+ * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szDatasetName);
+ __Pyx_GIVEREF(__pyx_v_szDatasetName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 21, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":22
+ * def NewDataset(self,str szDatasetName, int iReturnCode):
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * return self.lpPacker.NewDataset(sName,iReturnCode) # <<<<<<<<<<<<<<
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4):
+ * sName = bytes(szFieldName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 22, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->NewDataset(__pyx_t_4, __pyx_v_iReturnCode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 22, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":20
+ * def BeginPack(self):
+ * self.lpPacker.BeginPack()
+ * def NewDataset(self,str szDatasetName, int iReturnCode): # <<<<<<<<<<<<<<
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.NewDataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":23
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<<
+ * sName = bytes(szFieldName,encoding='utf-8')
+ * sType = bytes(cFieldType,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szFieldName = 0;
+ PyObject *__pyx_v_cFieldType = 0;
+ int __pyx_v_iFieldWidth;
+ int __pyx_v_iFieldScale;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddField (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szFieldName,&__pyx_n_s_cFieldType,&__pyx_n_s_iFieldWidth,&__pyx_n_s_iFieldScale,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[1] = ((PyObject*)__pyx_n_s_S);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szFieldName)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cFieldType);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldWidth);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iFieldScale);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddField") < 0)) __PYX_ERR(1, 23, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_szFieldName = ((PyObject*)values[0]);
+ __pyx_v_cFieldType = ((PyObject*)values[1]);
+ if (values[2]) {
+ __pyx_v_iFieldWidth = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iFieldWidth == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error)
+ } else {
+ __pyx_v_iFieldWidth = ((int)0xFF);
+ }
+ if (values[3]) {
+ __pyx_v_iFieldScale = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_iFieldScale == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 23, __pyx_L3_error)
+ } else {
+ __pyx_v_iFieldScale = ((int)4);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("AddField", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 23, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFieldName), (&PyString_Type), 1, "szFieldName", 1))) __PYX_ERR(1, 23, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cFieldType), (&PyString_Type), 1, "cFieldType", 1))) __PYX_ERR(1, 23, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_szFieldName, __pyx_v_cFieldType, __pyx_v_iFieldWidth, __pyx_v_iFieldScale);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_8AddField(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szFieldName, PyObject *__pyx_v_cFieldType, int __pyx_v_iFieldWidth, int __pyx_v_iFieldScale) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_v_sType = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char __pyx_t_5;
+ __Pyx_RefNannySetupContext("AddField", 0);
+
+ /* "py_t2sdk.pyx":24
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4):
+ * sName = bytes(szFieldName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sType = bytes(cFieldType,encoding='utf-8')
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szFieldName);
+ __Pyx_GIVEREF(__pyx_v_szFieldName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFieldName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 24, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":25
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4):
+ * sName = bytes(szFieldName,encoding='utf-8')
+ * sType = bytes(cFieldType,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ * def AddStr(self,str szValue):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 25, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_cFieldType);
+ __Pyx_GIVEREF(__pyx_v_cFieldType);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_cFieldType);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 25, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 25, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 25, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sType = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":26
+ * sName = bytes(szFieldName,encoding='utf-8')
+ * sType = bytes(cFieldType,encoding='utf-8')
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale) # <<<<<<<<<<<<<<
+ * def AddStr(self,str szValue):
+ * sValue = bytes(szValue,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_GetItemInt(__pyx_v_sType, 0, 1); if (unlikely(__pyx_t_5 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(1, 26, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddField(__pyx_t_4, __pyx_t_5, __pyx_v_iFieldWidth, __pyx_v_iFieldScale)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":23
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * return self.lpPacker.NewDataset(sName,iReturnCode)
+ * def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4): # <<<<<<<<<<<<<<
+ * sName = bytes(szFieldName,encoding='utf-8')
+ * sType = bytes(cFieldType,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddField", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XDECREF(__pyx_v_sType);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":27
+ * sType = bytes(cFieldType,encoding='utf-8')
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ * def AddStr(self,str szValue): # <<<<<<<<<<<<<<
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpPacker.AddStr(sValue)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr(PyObject *__pyx_v_self, PyObject *__pyx_v_szValue) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddStr (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 27, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szValue));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_10AddStr(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szValue) {
+ PyObject *__pyx_v_sValue = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("AddStr", 0);
+
+ /* "py_t2sdk.pyx":28
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ * def AddStr(self,str szValue):
+ * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddStr(sValue)
+ * def AddInt(self,int iValue):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szValue);
+ __Pyx_GIVEREF(__pyx_v_szValue);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 28, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sValue = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":29
+ * def AddStr(self,str szValue):
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpPacker.AddStr(sValue) # <<<<<<<<<<<<<<
+ * def AddInt(self,int iValue):
+ * return self.lpPacker.AddInt(iValue)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 29, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddStr(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":27
+ * sType = bytes(cFieldType,encoding='utf-8')
+ * return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ * def AddStr(self,str szValue): # <<<<<<<<<<<<<<
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpPacker.AddStr(sValue)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddStr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sValue);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":30
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpPacker.AddStr(sValue)
+ * def AddInt(self,int iValue): # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddInt(iValue)
+ * def AddDouble(self,double fValue):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt(PyObject *__pyx_v_self, PyObject *__pyx_arg_iValue) {
+ int __pyx_v_iValue;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddInt (wrapper)", 0);
+ assert(__pyx_arg_iValue); {
+ __pyx_v_iValue = __Pyx_PyInt_As_int(__pyx_arg_iValue); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((int)__pyx_v_iValue));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_12AddInt(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, int __pyx_v_iValue) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("AddInt", 0);
+
+ /* "py_t2sdk.pyx":31
+ * return self.lpPacker.AddStr(sValue)
+ * def AddInt(self,int iValue):
+ * return self.lpPacker.AddInt(iValue) # <<<<<<<<<<<<<<
+ * def AddDouble(self,double fValue):
+ * return self.lpPacker.AddDouble(fValue)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddInt(__pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 31, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":30
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpPacker.AddStr(sValue)
+ * def AddInt(self,int iValue): # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddInt(iValue)
+ * def AddDouble(self,double fValue):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":32
+ * def AddInt(self,int iValue):
+ * return self.lpPacker.AddInt(iValue)
+ * def AddDouble(self,double fValue): # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddDouble(fValue)
+ * def AddChar(self,str cValue):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble(PyObject *__pyx_v_self, PyObject *__pyx_arg_fValue) {
+ double __pyx_v_fValue;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddDouble (wrapper)", 0);
+ assert(__pyx_arg_fValue); {
+ __pyx_v_fValue = __pyx_PyFloat_AsDouble(__pyx_arg_fValue); if (unlikely((__pyx_v_fValue == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 32, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((double)__pyx_v_fValue));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_14AddDouble(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, double __pyx_v_fValue) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("AddDouble", 0);
+
+ /* "py_t2sdk.pyx":33
+ * return self.lpPacker.AddInt(iValue)
+ * def AddDouble(self,double fValue):
+ * return self.lpPacker.AddDouble(fValue) # <<<<<<<<<<<<<<
+ * def AddChar(self,str cValue):
+ * sValue = bytes(cValue,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddDouble(__pyx_v_fValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":32
+ * def AddInt(self,int iValue):
+ * return self.lpPacker.AddInt(iValue)
+ * def AddDouble(self,double fValue): # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddDouble(fValue)
+ * def AddChar(self,str cValue):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddDouble", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":34
+ * def AddDouble(self,double fValue):
+ * return self.lpPacker.AddDouble(fValue)
+ * def AddChar(self,str cValue): # <<<<<<<<<<<<<<
+ * sValue = bytes(cValue,encoding='utf-8')
+ * return self.lpPacker.AddChar(sValue[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar(PyObject *__pyx_v_self, PyObject *__pyx_v_cValue) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddChar (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cValue), (&PyString_Type), 1, "cValue", 1))) __PYX_ERR(1, 34, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_cValue));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_16AddChar(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_cValue) {
+ PyObject *__pyx_v_sValue = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("AddChar", 0);
+
+ /* "py_t2sdk.pyx":35
+ * return self.lpPacker.AddDouble(fValue)
+ * def AddChar(self,str cValue):
+ * sValue = bytes(cValue,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpPacker.AddChar(sValue[0])
+ * def AddRaw(self,list lpBuff,int iLen):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 35, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_cValue);
+ __Pyx_GIVEREF(__pyx_v_cValue);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cValue);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sValue = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":36
+ * def AddChar(self,str cValue):
+ * sValue = bytes(cValue,encoding='utf-8')
+ * return self.lpPacker.AddChar(sValue[0]) # <<<<<<<<<<<<<<
+ * def AddRaw(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_sValue, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 36, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 36, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->AddChar(__pyx_t_4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 36, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":34
+ * def AddDouble(self,double fValue):
+ * return self.lpPacker.AddDouble(fValue)
+ * def AddChar(self,str cValue): # <<<<<<<<<<<<<<
+ * sValue = bytes(cValue,encoding='utf-8')
+ * return self.lpPacker.AddChar(sValue[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddChar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sValue);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":37
+ * sValue = bytes(cValue,encoding='utf-8')
+ * return self.lpPacker.AddChar(sValue[0])
+ * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpBuff = 0;
+ int __pyx_v_iLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("AddRaw (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, 1); __PYX_ERR(1, 37, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "AddRaw") < 0)) __PYX_ERR(1, 37, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpBuff = ((PyObject*)values[0]);
+ __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 37, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("AddRaw", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 37, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 37, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_18AddRaw(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) {
+ char *__pyx_v_sBuff;
+ int __pyx_v_iIndex;
+ int __pyx_v_iRet;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ char __pyx_t_3;
+ __Pyx_RefNannySetupContext("AddRaw", 0);
+
+ /* "py_t2sdk.pyx":38
+ * return self.lpPacker.AddChar(sValue[0])
+ * def AddRaw(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen));
+
+ /* "py_t2sdk.pyx":39
+ * def AddRaw(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":40
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ */
+ while (1) {
+ __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_1) break;
+
+ /* "py_t2sdk.pyx":41
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<<
+ * iIndex+=1
+ * iRet = self.lpPacker.AddRaw(sBuff,iLen)
+ */
+ if (unlikely(__pyx_v_lpBuff == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 41, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 41, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3;
+
+ /* "py_t2sdk.pyx":42
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1 # <<<<<<<<<<<<<<
+ * iRet = self.lpPacker.AddRaw(sBuff,iLen)
+ * free(sBuff)
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":43
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ * iRet = self.lpPacker.AddRaw(sBuff,iLen) # <<<<<<<<<<<<<<
+ * free(sBuff)
+ * return iRet
+ */
+ __pyx_v_iRet = __pyx_v_self->lpPacker->AddRaw(__pyx_v_sBuff, __pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":44
+ * iIndex+=1
+ * iRet = self.lpPacker.AddRaw(sBuff,iLen)
+ * free(sBuff) # <<<<<<<<<<<<<<
+ * return iRet
+ * def EndPack(self):
+ */
+ free(__pyx_v_sBuff);
+
+ /* "py_t2sdk.pyx":45
+ * iRet = self.lpPacker.AddRaw(sBuff,iLen)
+ * free(sBuff)
+ * return iRet # <<<<<<<<<<<<<<
+ * def EndPack(self):
+ * return self.lpPacker.EndPack()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":37
+ * sValue = bytes(cValue,encoding='utf-8')
+ * return self.lpPacker.AddChar(sValue[0])
+ * def AddRaw(self,list lpBuff,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.AddRaw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":46
+ * free(sBuff)
+ * return iRet
+ * def EndPack(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.EndPack()
+ * def GetPackBuf(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("EndPack (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_20EndPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("EndPack", 0);
+
+ /* "py_t2sdk.pyx":47
+ * return iRet
+ * def EndPack(self):
+ * return self.lpPacker.EndPack() # <<<<<<<<<<<<<<
+ * def GetPackBuf(self):
+ * cdef int iLength = self.lpPacker.GetPackLen()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpPacker->EndPack()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":46
+ * free(sBuff)
+ * return iRet
+ * def EndPack(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.EndPack()
+ * def GetPackBuf(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.EndPack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":48
+ * def EndPack(self):
+ * return self.lpPacker.EndPack()
+ * def GetPackBuf(self): # <<<<<<<<<<<<<<
+ * cdef int iLength = self.lpPacker.GetPackLen()
+ * cdef int* sBuff = self.lpPacker.GetPackBuf()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_22GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ int __pyx_v_iLength;
+ int *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("GetPackBuf", 0);
+
+ /* "py_t2sdk.pyx":49
+ * return self.lpPacker.EndPack()
+ * def GetPackBuf(self):
+ * cdef int iLength = self.lpPacker.GetPackLen() # <<<<<<<<<<<<<<
+ * cdef int* sBuff = self.lpPacker.GetPackBuf()
+ * lpBuff = []
+ */
+ __pyx_v_iLength = __pyx_v_self->lpPacker->GetPackLen();
+
+ /* "py_t2sdk.pyx":50
+ * def GetPackBuf(self):
+ * cdef int iLength = self.lpPacker.GetPackLen()
+ * cdef int* sBuff = self.lpPacker.GetPackBuf() # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef int iIndex = 0
+ */
+ __pyx_v_sBuff = __pyx_v_self->lpPacker->GetPackBuf();
+
+ /* "py_t2sdk.pyx":51
+ * cdef int iLength = self.lpPacker.GetPackLen()
+ * cdef int* sBuff = self.lpPacker.GetPackBuf()
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 51, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":52
+ * cdef int* sBuff = self.lpPacker.GetPackBuf()
+ * lpBuff = []
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":53
+ * lpBuff = []
+ * cdef int iIndex = 0
+ * while iIndex < iLength: # <<<<<<<<<<<<<<
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ */
+ while (1) {
+ __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLength) != 0);
+ if (!__pyx_t_2) break;
+
+ /* "py_t2sdk.pyx":54
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 54, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 54, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":55
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff
+ * def GetPackLen(self):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":56
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ * return lpBuff # <<<<<<<<<<<<<<
+ * def GetPackLen(self):
+ * return self.lpPacker.GetPackLen()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __pyx_r = __pyx_v_lpBuff;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":48
+ * def EndPack(self):
+ * return self.lpPacker.EndPack()
+ * def GetPackBuf(self): # <<<<<<<<<<<<<<
+ * cdef int iLength = self.lpPacker.GetPackLen()
+ * cdef int* sBuff = self.lpPacker.GetPackBuf()
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":57
+ * iIndex +=1
+ * return lpBuff
+ * def GetPackLen(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetPackLen()
+ * def GetPackBufSize(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_24GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPackLen", 0);
+
+ /* "py_t2sdk.pyx":58
+ * return lpBuff
+ * def GetPackLen(self):
+ * return self.lpPacker.GetPackLen() # <<<<<<<<<<<<<<
+ * def GetPackBufSize(self):
+ * return self.lpPacker.GetPackBufSize()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":57
+ * iIndex +=1
+ * return lpBuff
+ * def GetPackLen(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetPackLen()
+ * def GetPackBufSize(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":59
+ * def GetPackLen(self):
+ * return self.lpPacker.GetPackLen()
+ * def GetPackBufSize(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetPackBufSize()
+ * def GetVersion(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPackBufSize (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_26GetPackBufSize(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPackBufSize", 0);
+
+ /* "py_t2sdk.pyx":60
+ * return self.lpPacker.GetPackLen()
+ * def GetPackBufSize(self):
+ * return self.lpPacker.GetPackBufSize() # <<<<<<<<<<<<<<
+ * def GetVersion(self):
+ * return self.lpPacker.GetVersion()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetPackBufSize()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 60, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":59
+ * def GetPackLen(self):
+ * return self.lpPacker.GetPackLen()
+ * def GetPackBufSize(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetPackBufSize()
+ * def GetVersion(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetPackBufSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":61
+ * def GetPackBufSize(self):
+ * return self.lpPacker.GetPackBufSize()
+ * def GetVersion(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetVersion()
+ * def SetReturnCode(self,long dwRetCode):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_28GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetVersion", 0);
+
+ /* "py_t2sdk.pyx":62
+ * return self.lpPacker.GetPackBufSize()
+ * def GetVersion(self):
+ * return self.lpPacker.GetVersion() # <<<<<<<<<<<<<<
+ * def SetReturnCode(self,long dwRetCode):
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpPacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":61
+ * def GetPackBufSize(self):
+ * return self.lpPacker.GetPackBufSize()
+ * def GetVersion(self): # <<<<<<<<<<<<<<
+ * return self.lpPacker.GetVersion()
+ * def SetReturnCode(self,long dwRetCode):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":63
+ * def GetVersion(self):
+ * return self.lpPacker.GetVersion()
+ * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<<
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ * def UnPack(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_dwRetCode) {
+ long __pyx_v_dwRetCode;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0);
+ assert(__pyx_arg_dwRetCode); {
+ __pyx_v_dwRetCode = __Pyx_PyInt_As_long(__pyx_arg_dwRetCode); if (unlikely((__pyx_v_dwRetCode == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 63, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((long)__pyx_v_dwRetCode));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_30SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, long __pyx_v_dwRetCode) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReturnCode", 0);
+
+ /* "py_t2sdk.pyx":64
+ * return self.lpPacker.GetVersion()
+ * def SetReturnCode(self,long dwRetCode):
+ * self.lpPacker.SetReturnCode(dwRetCode) # <<<<<<<<<<<<<<
+ * def UnPack(self):
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ */
+ __pyx_v_self->lpPacker->SetReturnCode(__pyx_v_dwRetCode);
+
+ /* "py_t2sdk.pyx":63
+ * def GetVersion(self):
+ * return self.lpPacker.GetVersion()
+ * def SetReturnCode(self,long dwRetCode): # <<<<<<<<<<<<<<
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ * def UnPack(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":65
+ * def SetReturnCode(self,long dwRetCode):
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ * def UnPack(self): # <<<<<<<<<<<<<<
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ * lpPyUnpacker = pyIF2UnPacker()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("UnPack (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_32UnPack(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ c_IF2UnPacker *__pyx_v_lpUnpacker;
+ struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpPyUnpacker = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("UnPack", 0);
+
+ /* "py_t2sdk.pyx":66
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ * def UnPack(self):
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack() # <<<<<<<<<<<<<<
+ * lpPyUnpacker = pyIF2UnPacker()
+ * lpPyUnpacker.lpUnpacker = lpUnpacker
+ */
+ __pyx_v_lpUnpacker = __pyx_v_self->lpPacker->UnPack();
+
+ /* "py_t2sdk.pyx":67
+ * def UnPack(self):
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ * lpPyUnpacker = pyIF2UnPacker() # <<<<<<<<<<<<<<
+ * lpPyUnpacker.lpUnpacker = lpUnpacker
+ * return lpPyUnpacker
+ */
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIF2UnPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 67, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpPyUnpacker = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":68
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ * lpPyUnpacker = pyIF2UnPacker()
+ * lpPyUnpacker.lpUnpacker = lpUnpacker # <<<<<<<<<<<<<<
+ * return lpPyUnpacker
+ * def FreeMem(self):
+ */
+ __pyx_v_lpPyUnpacker->lpUnpacker = __pyx_v_lpUnpacker;
+
+ /* "py_t2sdk.pyx":69
+ * lpPyUnpacker = pyIF2UnPacker()
+ * lpPyUnpacker.lpUnpacker = lpUnpacker
+ * return lpPyUnpacker # <<<<<<<<<<<<<<
+ * def FreeMem(self):
+ * self.lpPacker.FreeMem()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(((PyObject *)__pyx_v_lpPyUnpacker));
+ __pyx_r = ((PyObject *)__pyx_v_lpPyUnpacker);
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":65
+ * def SetReturnCode(self,long dwRetCode):
+ * self.lpPacker.SetReturnCode(dwRetCode)
+ * def UnPack(self): # <<<<<<<<<<<<<<
+ * cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ * lpPyUnpacker = pyIF2UnPacker()
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.UnPack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_lpPyUnpacker);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":70
+ * lpPyUnpacker.lpUnpacker = lpUnpacker
+ * return lpPyUnpacker
+ * def FreeMem(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.FreeMem()
+ * def ClearValue(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("FreeMem (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_34FreeMem(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("FreeMem", 0);
+
+ /* "py_t2sdk.pyx":71
+ * return lpPyUnpacker
+ * def FreeMem(self):
+ * self.lpPacker.FreeMem() # <<<<<<<<<<<<<<
+ * def ClearValue(self):
+ * self.lpPacker.ClearValue()
+ */
+ __pyx_v_self->lpPacker->FreeMem();
+
+ /* "py_t2sdk.pyx":70
+ * lpPyUnpacker.lpUnpacker = lpUnpacker
+ * return lpPyUnpacker
+ * def FreeMem(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.FreeMem()
+ * def ClearValue(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":72
+ * def FreeMem(self):
+ * self.lpPacker.FreeMem()
+ * def ClearValue(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.ClearValue()
+ * def BeginPackEx(self,str szName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ClearValue (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_36ClearValue(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ClearValue", 0);
+
+ /* "py_t2sdk.pyx":73
+ * self.lpPacker.FreeMem()
+ * def ClearValue(self):
+ * self.lpPacker.ClearValue() # <<<<<<<<<<<<<<
+ * def BeginPackEx(self,str szName):
+ * sName = bytes(szName,encoding='utf-8')
+ */
+ __pyx_v_self->lpPacker->ClearValue();
+
+ /* "py_t2sdk.pyx":72
+ * def FreeMem(self):
+ * self.lpPacker.FreeMem()
+ * def ClearValue(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.ClearValue()
+ * def BeginPackEx(self,str szName):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":74
+ * def ClearValue(self):
+ * self.lpPacker.ClearValue()
+ * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<<
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpPacker.BeginPackEx(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("BeginPackEx (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 74, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject*)__pyx_v_szName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_38BeginPackEx(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, PyObject *__pyx_v_szName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("BeginPackEx", 0);
+
+ /* "py_t2sdk.pyx":75
+ * self.lpPacker.ClearValue()
+ * def BeginPackEx(self,str szName):
+ * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpPacker.BeginPackEx(sName)
+ * def ClearDataSet(self):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 75, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szName);
+ __Pyx_GIVEREF(__pyx_v_szName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 75, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 75, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 75, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":76
+ * def BeginPackEx(self,str szName):
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpPacker.BeginPackEx(sName) # <<<<<<<<<<<<<<
+ * def ClearDataSet(self):
+ * self.lpPacker.ClearDataSet()
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 76, __pyx_L1_error)
+ __pyx_v_self->lpPacker->BeginPackEx(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":74
+ * def ClearValue(self):
+ * self.lpPacker.ClearValue()
+ * def BeginPackEx(self,str szName): # <<<<<<<<<<<<<<
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpPacker.BeginPackEx(sName)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.BeginPackEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":77
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpPacker.BeginPackEx(sName)
+ * def ClearDataSet(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.ClearDataSet()
+ * def Release(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ClearDataSet (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_40ClearDataSet(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ClearDataSet", 0);
+
+ /* "py_t2sdk.pyx":78
+ * self.lpPacker.BeginPackEx(sName)
+ * def ClearDataSet(self):
+ * self.lpPacker.ClearDataSet() # <<<<<<<<<<<<<<
+ * def Release(self):
+ * self.lpPacker.Release()
+ */
+ __pyx_v_self->lpPacker->ClearDataSet();
+
+ /* "py_t2sdk.pyx":77
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpPacker.BeginPackEx(sName)
+ * def ClearDataSet(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.ClearDataSet()
+ * def Release(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":79
+ * def ClearDataSet(self):
+ * self.lpPacker.ClearDataSet()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.Release()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_42Release(struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":80
+ * self.lpPacker.ClearDataSet()
+ * def Release(self):
+ * self.lpPacker.Release() # <<<<<<<<<<<<<<
+ *
+ * cdef class pyIF2UnPacker:
+ */
+ __pyx_v_self->lpPacker->Release();
+
+ /* "py_t2sdk.pyx":79
+ * def ClearDataSet(self):
+ * self.lpPacker.ClearDataSet()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpPacker.Release()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_11pyIF2Packer_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2Packer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":84
+ * cdef class pyIF2UnPacker:
+ * cdef c_IF2UnPacker* lpUnpacker
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_13pyIF2UnPacker___cinit__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":85
+ * cdef c_IF2UnPacker* lpUnpacker
+ * def __cinit__(self):
+ * self.lpUnpacker = NULL # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * if self.lpUnpacker != NULL:
+ */
+ __pyx_v_self->lpUnpacker = NULL;
+
+ /* "py_t2sdk.pyx":84
+ * cdef class pyIF2UnPacker:
+ * cdef c_IF2UnPacker* lpUnpacker
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":86
+ * def __cinit__(self):
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker != NULL:
+ * del self.lpUnpacker
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_13pyIF2UnPacker_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":87
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self):
+ * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<<
+ * del self.lpUnpacker
+ * self.lpUnpacker = NULL
+ */
+ __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":88
+ * def __dealloc__(self):
+ * if self.lpUnpacker != NULL:
+ * del self.lpUnpacker # <<<<<<<<<<<<<<
+ * self.lpUnpacker = NULL
+ * def GetVersion(self):
+ */
+ delete __pyx_v_self->lpUnpacker;
+
+ /* "py_t2sdk.pyx":89
+ * if self.lpUnpacker != NULL:
+ * del self.lpUnpacker
+ * self.lpUnpacker = NULL # <<<<<<<<<<<<<<
+ * def GetVersion(self):
+ * return self.lpUnpacker.GetVersion()
+ */
+ __pyx_v_self->lpUnpacker = NULL;
+
+ /* "py_t2sdk.pyx":87
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self):
+ * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<<
+ * del self.lpUnpacker
+ * self.lpUnpacker = NULL
+ */
+ }
+
+ /* "py_t2sdk.pyx":86
+ * def __cinit__(self):
+ * self.lpUnpacker = NULL
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker != NULL:
+ * del self.lpUnpacker
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":90
+ * del self.lpUnpacker
+ * self.lpUnpacker = NULL
+ * def GetVersion(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetVersion()
+ * def Open(self,list lpBuff,int iLen):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetVersion (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_4GetVersion(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetVersion", 0);
+
+ /* "py_t2sdk.pyx":91
+ * self.lpUnpacker = NULL
+ * def GetVersion(self):
+ * return self.lpUnpacker.GetVersion() # <<<<<<<<<<<<<<
+ * def Open(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetVersion()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":90
+ * del self.lpUnpacker
+ * self.lpUnpacker = NULL
+ * def GetVersion(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetVersion()
+ * def Open(self,list lpBuff,int iLen):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":92
+ * def GetVersion(self):
+ * return self.lpUnpacker.GetVersion()
+ * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpBuff = 0;
+ int __pyx_v_iLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Open (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_iLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, 1); __PYX_ERR(1, 92, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Open") < 0)) __PYX_ERR(1, 92, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpBuff = ((PyObject*)values[0]);
+ __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 92, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("Open", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 92, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 92, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_iLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_6Open(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_iLen) {
+ char *__pyx_v_sBuff;
+ int __pyx_v_iIndex;
+ long __pyx_v_iRet;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ char __pyx_t_3;
+ c_IF2UnPacker *__pyx_t_4;
+ __Pyx_RefNannySetupContext("Open", 0);
+
+ /* "py_t2sdk.pyx":93
+ * return self.lpUnpacker.GetVersion()
+ * def Open(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen));
+
+ /* "py_t2sdk.pyx":94
+ * def Open(self,list lpBuff,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":95
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ */
+ while (1) {
+ __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_1) break;
+
+ /* "py_t2sdk.pyx":96
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<<
+ * iIndex+=1
+ * if self.lpUnpacker == NULL:
+ */
+ if (unlikely(__pyx_v_lpBuff == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 96, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3;
+
+ /* "py_t2sdk.pyx":97
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1 # <<<<<<<<<<<<<<
+ * if self.lpUnpacker == NULL:
+ * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen)
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":98
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen)
+ * iRet = 0
+ */
+ __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":99
+ * iIndex+=1
+ * if self.lpUnpacker == NULL:
+ * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen) # <<<<<<<<<<<<<<
+ * iRet = 0
+ * else:
+ */
+ try {
+ __pyx_t_4 = new c_IF2UnPacker(__pyx_v_sBuff, __pyx_v_iLen);
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 99, __pyx_L1_error)
+ }
+ __pyx_v_self->lpUnpacker = __pyx_t_4;
+
+ /* "py_t2sdk.pyx":100
+ * if self.lpUnpacker == NULL:
+ * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen)
+ * iRet = 0 # <<<<<<<<<<<<<<
+ * else:
+ * iRet = self.lpUnpacker.Open(sBuff,iLen)
+ */
+ __pyx_v_iRet = 0;
+
+ /* "py_t2sdk.pyx":98
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen)
+ * iRet = 0
+ */
+ goto __pyx_L5;
+ }
+
+ /* "py_t2sdk.pyx":102
+ * iRet = 0
+ * else:
+ * iRet = self.lpUnpacker.Open(sBuff,iLen) # <<<<<<<<<<<<<<
+ * free(sBuff)
+ * return iRet
+ */
+ /*else*/ {
+ __pyx_v_iRet = __pyx_v_self->lpUnpacker->Open(__pyx_v_sBuff, __pyx_v_iLen);
+ }
+ __pyx_L5:;
+
+ /* "py_t2sdk.pyx":103
+ * else:
+ * iRet = self.lpUnpacker.Open(sBuff,iLen)
+ * free(sBuff) # <<<<<<<<<<<<<<
+ * return iRet
+ * def GetDatasetCount(self):
+ */
+ free(__pyx_v_sBuff);
+
+ /* "py_t2sdk.pyx":104
+ * iRet = self.lpUnpacker.Open(sBuff,iLen)
+ * free(sBuff)
+ * return iRet # <<<<<<<<<<<<<<
+ * def GetDatasetCount(self):
+ * if self.lpUnpacker == NULL:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_iRet); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":92
+ * def GetVersion(self):
+ * return self.lpUnpacker.GetVersion()
+ * def Open(self,list lpBuff,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Open", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":105
+ * free(sBuff)
+ * return iRet
+ * def GetDatasetCount(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker == NULL:
+ * return -1;
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetDatasetCount (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_8GetDatasetCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("GetDatasetCount", 0);
+
+ /* "py_t2sdk.pyx":106
+ * return iRet
+ * def GetDatasetCount(self):
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * return -1;
+ * return self.lpUnpacker.GetDatasetCount()
+ */
+ __pyx_t_1 = ((__pyx_v_self->lpUnpacker == NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":107
+ * def GetDatasetCount(self):
+ * if self.lpUnpacker == NULL:
+ * return -1; # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetDatasetCount()
+ * def SetCurrentDatasetByIndex(self,int nIndex):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __pyx_r = __pyx_int_neg_1;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":106
+ * return iRet
+ * def GetDatasetCount(self):
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * return -1;
+ * return self.lpUnpacker.GetDatasetCount()
+ */
+ }
+
+ /* "py_t2sdk.pyx":108
+ * if self.lpUnpacker == NULL:
+ * return -1;
+ * return self.lpUnpacker.GetDatasetCount() # <<<<<<<<<<<<<<
+ * def SetCurrentDatasetByIndex(self,int nIndex):
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetDatasetCount()); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":105
+ * free(sBuff)
+ * return iRet
+ * def GetDatasetCount(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker == NULL:
+ * return -1;
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":109
+ * return -1;
+ * return self.lpUnpacker.GetDatasetCount()
+ * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ * def SetCurrentDataset(self,str szDatasetName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIndex) {
+ int __pyx_v_nIndex;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex (wrapper)", 0);
+ assert(__pyx_arg_nIndex); {
+ __pyx_v_nIndex = __Pyx_PyInt_As_int(__pyx_arg_nIndex); if (unlikely((__pyx_v_nIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 109, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.SetCurrentDatasetByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nIndex));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_10SetCurrentDatasetByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nIndex) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetCurrentDatasetByIndex", 0);
+
+ /* "py_t2sdk.pyx":110
+ * return self.lpUnpacker.GetDatasetCount()
+ * def SetCurrentDatasetByIndex(self,int nIndex):
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex) # <<<<<<<<<<<<<<
+ * def SetCurrentDataset(self,str szDatasetName):
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ */
+ (void)(__pyx_v_self->lpUnpacker->SetCurrentDatasetByIndex(__pyx_v_nIndex));
+
+ /* "py_t2sdk.pyx":109
+ * return -1;
+ * return self.lpUnpacker.GetDatasetCount()
+ * def SetCurrentDatasetByIndex(self,int nIndex): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ * def SetCurrentDataset(self,str szDatasetName):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":111
+ * def SetCurrentDatasetByIndex(self,int nIndex):
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<<
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset(PyObject *__pyx_v_self, PyObject *__pyx_v_szDatasetName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetCurrentDataset (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDatasetName), (&PyString_Type), 1, "szDatasetName", 1))) __PYX_ERR(1, 111, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_szDatasetName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_12SetCurrentDataset(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_szDatasetName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetCurrentDataset", 0);
+
+ /* "py_t2sdk.pyx":112
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ * def SetCurrentDataset(self,str szDatasetName):
+ * sName = bytes(szDatasetName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ * def GetPackBuf(self):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szDatasetName);
+ __Pyx_GIVEREF(__pyx_v_szDatasetName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDatasetName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 112, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":113
+ * def SetCurrentDataset(self,str szDatasetName):
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * self.lpUnpacker.SetCurrentDataset(sName) # <<<<<<<<<<<<<<
+ * def GetPackBuf(self):
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 113, __pyx_L1_error)
+ (void)(__pyx_v_self->lpUnpacker->SetCurrentDataset(__pyx_t_4));
+
+ /* "py_t2sdk.pyx":111
+ * def SetCurrentDatasetByIndex(self,int nIndex):
+ * self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ * def SetCurrentDataset(self,str szDatasetName): # <<<<<<<<<<<<<<
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.SetCurrentDataset", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":114
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ * def GetPackBuf(self): # <<<<<<<<<<<<<<
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ * return lpBuff
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPackBuf (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_14GetPackBuf(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ char *__pyx_v_lpBuff;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPackBuf", 0);
+
+ /* "py_t2sdk.pyx":115
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ * def GetPackBuf(self):
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf() # <<<<<<<<<<<<<<
+ * return lpBuff
+ * def GetPackLen(self):
+ */
+ __pyx_v_lpBuff = __pyx_v_self->lpUnpacker->GetPackBuf();
+
+ /* "py_t2sdk.pyx":116
+ * def GetPackBuf(self):
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ * return lpBuff # <<<<<<<<<<<<<<
+ * def GetPackLen(self):
+ * return self.lpUnpacker.GetPackLen()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpBuff); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":114
+ * sName = bytes(szDatasetName,encoding='utf-8')
+ * self.lpUnpacker.SetCurrentDataset(sName)
+ * def GetPackBuf(self): # <<<<<<<<<<<<<<
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ * return lpBuff
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackBuf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":117
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ * return lpBuff
+ * def GetPackLen(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetPackLen()
+ * def GetRowCount(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPackLen (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_16GetPackLen(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPackLen", 0);
+
+ /* "py_t2sdk.pyx":118
+ * return lpBuff
+ * def GetPackLen(self):
+ * return self.lpUnpacker.GetPackLen() # <<<<<<<<<<<<<<
+ * def GetRowCount(self):
+ * return self.lpUnpacker.GetRowCount()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetPackLen()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":117
+ * cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ * return lpBuff
+ * def GetPackLen(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetPackLen()
+ * def GetRowCount(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetPackLen", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":119
+ * def GetPackLen(self):
+ * return self.lpUnpacker.GetPackLen()
+ * def GetRowCount(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetRowCount()
+ * def First(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetRowCount (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_18GetRowCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetRowCount", 0);
+
+ /* "py_t2sdk.pyx":120
+ * return self.lpUnpacker.GetPackLen()
+ * def GetRowCount(self):
+ * return self.lpUnpacker.GetRowCount() # <<<<<<<<<<<<<<
+ * def First(self):
+ * self.lpUnpacker.First()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetRowCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":119
+ * def GetPackLen(self):
+ * return self.lpUnpacker.GetPackLen()
+ * def GetRowCount(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetRowCount()
+ * def First(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRowCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":121
+ * def GetRowCount(self):
+ * return self.lpUnpacker.GetRowCount()
+ * def First(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.First()
+ * def Last(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("First (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_20First(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("First", 0);
+
+ /* "py_t2sdk.pyx":122
+ * return self.lpUnpacker.GetRowCount()
+ * def First(self):
+ * self.lpUnpacker.First() # <<<<<<<<<<<<<<
+ * def Last(self):
+ * self.lpUnpacker.Last()
+ */
+ __pyx_v_self->lpUnpacker->First();
+
+ /* "py_t2sdk.pyx":121
+ * def GetRowCount(self):
+ * return self.lpUnpacker.GetRowCount()
+ * def First(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.First()
+ * def Last(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":123
+ * def First(self):
+ * self.lpUnpacker.First()
+ * def Last(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Last()
+ * def Go(self,int nRow):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Last (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_22Last(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Last", 0);
+
+ /* "py_t2sdk.pyx":124
+ * self.lpUnpacker.First()
+ * def Last(self):
+ * self.lpUnpacker.Last() # <<<<<<<<<<<<<<
+ * def Go(self,int nRow):
+ * self.lpUnpacker.Go(nRow)
+ */
+ __pyx_v_self->lpUnpacker->Last();
+
+ /* "py_t2sdk.pyx":123
+ * def First(self):
+ * self.lpUnpacker.First()
+ * def Last(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Last()
+ * def Go(self,int nRow):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":125
+ * def Last(self):
+ * self.lpUnpacker.Last()
+ * def Go(self,int nRow): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Go(nRow)
+ * def GetDatasetName(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go(PyObject *__pyx_v_self, PyObject *__pyx_arg_nRow) {
+ int __pyx_v_nRow;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Go (wrapper)", 0);
+ assert(__pyx_arg_nRow); {
+ __pyx_v_nRow = __Pyx_PyInt_As_int(__pyx_arg_nRow); if (unlikely((__pyx_v_nRow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 125, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.Go", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_nRow));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_24Go(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_nRow) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Go", 0);
+
+ /* "py_t2sdk.pyx":126
+ * self.lpUnpacker.Last()
+ * def Go(self,int nRow):
+ * self.lpUnpacker.Go(nRow) # <<<<<<<<<<<<<<
+ * def GetDatasetName(self):
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ */
+ __pyx_v_self->lpUnpacker->Go(__pyx_v_nRow);
+
+ /* "py_t2sdk.pyx":125
+ * def Last(self):
+ * self.lpUnpacker.Last()
+ * def Go(self,int nRow): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Go(nRow)
+ * def GetDatasetName(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":127
+ * def Go(self,int nRow):
+ * self.lpUnpacker.Go(nRow)
+ * def GetDatasetName(self): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ * return sName
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetDatasetName (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_26GetDatasetName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ char *__pyx_v_sName;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetDatasetName", 0);
+
+ /* "py_t2sdk.pyx":128
+ * self.lpUnpacker.Go(nRow)
+ * def GetDatasetName(self):
+ * cdef char* sName = self.lpUnpacker.GetDatasetName() # <<<<<<<<<<<<<<
+ * return sName
+ * def GetColTypeByName(self,str columnName):
+ */
+ __pyx_v_sName = __pyx_v_self->lpUnpacker->GetDatasetName();
+
+ /* "py_t2sdk.pyx":129
+ * def GetDatasetName(self):
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ * return sName # <<<<<<<<<<<<<<
+ * def GetColTypeByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":127
+ * def Go(self,int nRow):
+ * self.lpUnpacker.Go(nRow)
+ * def GetDatasetName(self): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ * return sName
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDatasetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":130
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ * return sName
+ * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColTypeByName (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 130, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_28GetColTypeByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ char *__pyx_v_sType;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("GetColTypeByName", 0);
+
+ /* "py_t2sdk.pyx":131
+ * return sName
+ * def GetColTypeByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ * return sType.decode('gbk')
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 131, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":132
+ * def GetColTypeByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName) # <<<<<<<<<<<<<<
+ * return sType.decode('gbk')
+ * def GetColScaleByName(self,str columnName):
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 132, __pyx_L1_error)
+ __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColTypeByName(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":133
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ * return sType.decode('gbk') # <<<<<<<<<<<<<<
+ * def GetColScaleByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":130
+ * cdef char* sName = self.lpUnpacker.GetDatasetName()
+ * return sName
+ * def GetColTypeByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColTypeByName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":134
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ * return sType.decode('gbk')
+ * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColScaleByName (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 134, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_30GetColScaleByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("GetColScaleByName", 0);
+
+ /* "py_t2sdk.pyx":135
+ * return sType.decode('gbk')
+ * def GetColScaleByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ * def GetColWidthByName(self,str columnName):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 135, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":136
+ * def GetColScaleByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColScaleByName(sName) # <<<<<<<<<<<<<<
+ * def GetColWidthByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 136, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScaleByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":134
+ * cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ * return sType.decode('gbk')
+ * def GetColScaleByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScaleByName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":137
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColWidthByName (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 137, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_32GetColWidthByName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("GetColWidthByName", 0);
+
+ /* "py_t2sdk.pyx":138
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ * def GetColWidthByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ * def GetColCount(self):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 138, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":139
+ * def GetColWidthByName(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColWidthByName(sName) # <<<<<<<<<<<<<<
+ * def GetColCount(self):
+ * return self.lpUnpacker.GetColCount()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 139, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidthByName(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":137
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColScaleByName(sName)
+ * def GetColWidthByName(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidthByName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":140
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ * def GetColCount(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColCount()
+ * def GetColName(self,int column):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColCount (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_34GetColCount(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetColCount", 0);
+
+ /* "py_t2sdk.pyx":141
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ * def GetColCount(self):
+ * return self.lpUnpacker.GetColCount() # <<<<<<<<<<<<<<
+ * def GetColName(self,int column):
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":140
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetColWidthByName(sName)
+ * def GetColCount(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColCount()
+ * def GetColName(self,int column):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":142
+ * def GetColCount(self):
+ * return self.lpUnpacker.GetColCount()
+ * def GetColName(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ * def GetColType(self,int column):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColName (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 142, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_36GetColName(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ char *__pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("GetColName", 0);
+
+ /* "py_t2sdk.pyx":143
+ * return self.lpUnpacker.GetColCount()
+ * def GetColName(self,int column):
+ * return self.lpUnpacker.GetColName(column).decode('gbk') # <<<<<<<<<<<<<<
+ * def GetColType(self,int column):
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_v_self->lpUnpacker->GetColName(__pyx_v_column);
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":142
+ * def GetColCount(self):
+ * return self.lpUnpacker.GetColCount()
+ * def GetColName(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ * def GetColType(self,int column):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":144
+ * def GetColName(self,int column):
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ * def GetColType(self,int column): # <<<<<<<<<<<<<<
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ * return sType.decode('gbk')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColType (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 144, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_38GetColType(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ char *__pyx_v_sType;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetColType", 0);
+
+ /* "py_t2sdk.pyx":145
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ * def GetColType(self,int column):
+ * cdef char* sType = self.lpUnpacker.GetColType(column) # <<<<<<<<<<<<<<
+ * return sType.decode('gbk')
+ * def GetColScale(self,int column):
+ */
+ __pyx_v_sType = __pyx_v_self->lpUnpacker->GetColType(__pyx_v_column);
+
+ /* "py_t2sdk.pyx":146
+ * def GetColType(self,int column):
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ * return sType.decode('gbk') # <<<<<<<<<<<<<<
+ * def GetColScale(self,int column):
+ * return self.lpUnpacker.GetColScale(column)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sType, 0, strlen(__pyx_v_sType), ((char const *)"gbk"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":144
+ * def GetColName(self,int column):
+ * return self.lpUnpacker.GetColName(column).decode('gbk')
+ * def GetColType(self,int column): # <<<<<<<<<<<<<<
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ * return sType.decode('gbk')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":147
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ * return sType.decode('gbk')
+ * def GetColScale(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColScale(column)
+ * def GetColWidth(self,int column):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColScale (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 147, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_40GetColScale(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetColScale", 0);
+
+ /* "py_t2sdk.pyx":148
+ * return sType.decode('gbk')
+ * def GetColScale(self,int column):
+ * return self.lpUnpacker.GetColScale(column) # <<<<<<<<<<<<<<
+ * def GetColWidth(self,int column):
+ * return self.lpUnpacker.GetColWidth(column)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColScale(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":147
+ * cdef char* sType = self.lpUnpacker.GetColType(column)
+ * return sType.decode('gbk')
+ * def GetColScale(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColScale(column)
+ * def GetColWidth(self,int column):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColScale", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":149
+ * def GetColScale(self,int column):
+ * return self.lpUnpacker.GetColScale(column)
+ * def GetColWidth(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColWidth(column)
+ * def FindColIndex(self,str columnName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetColWidth (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 149, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_42GetColWidth(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetColWidth", 0);
+
+ /* "py_t2sdk.pyx":150
+ * return self.lpUnpacker.GetColScale(column)
+ * def GetColWidth(self,int column):
+ * return self.lpUnpacker.GetColWidth(column) # <<<<<<<<<<<<<<
+ * def FindColIndex(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetColWidth(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":149
+ * def GetColScale(self,int column):
+ * return self.lpUnpacker.GetColScale(column)
+ * def GetColWidth(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetColWidth(column)
+ * def FindColIndex(self,str columnName):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetColWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":151
+ * def GetColWidth(self,int column):
+ * return self.lpUnpacker.GetColWidth(column)
+ * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.FindColIndex(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("FindColIndex (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 151, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_44FindColIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("FindColIndex", 0);
+
+ /* "py_t2sdk.pyx":152
+ * return self.lpUnpacker.GetColWidth(column)
+ * def FindColIndex(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.FindColIndex(sName)
+ * def GetStrByIndex(self,int column):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 152, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":153
+ * def FindColIndex(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.FindColIndex(sName) # <<<<<<<<<<<<<<
+ * def GetStrByIndex(self,int column):
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 153, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->FindColIndex(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":151
+ * def GetColWidth(self,int column):
+ * return self.lpUnpacker.GetColWidth(column)
+ * def FindColIndex(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.FindColIndex(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.FindColIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":154
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.FindColIndex(sName)
+ * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ * def GetStr(self,str columnName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetStrByIndex (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 154, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_46GetStrByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ char *__pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("GetStrByIndex", 0);
+
+ /* "py_t2sdk.pyx":155
+ * return self.lpUnpacker.FindColIndex(sName)
+ * def GetStrByIndex(self,int column):
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK') # <<<<<<<<<<<<<<
+ * def GetStr(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_v_self->lpUnpacker->GetStrByIndex(__pyx_v_column);
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":154
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.FindColIndex(sName)
+ * def GetStrByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ * def GetStr(self,str columnName):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStrByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":156
+ * def GetStrByIndex(self,int column):
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ * def GetStr(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetStr (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 156, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_48GetStr(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("GetStr", 0);
+
+ /* "py_t2sdk.pyx":157
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ * def GetStr(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ * def GetCharByIndex(self,int column):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 157, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":158
+ * def GetStr(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetStr(sName).decode('GBK') # <<<<<<<<<<<<<<
+ * def GetCharByIndex(self,int column):
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 158, __pyx_L1_error)
+ __pyx_t_5 = __pyx_v_self->lpUnpacker->GetStr(__pyx_t_4);
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":156
+ * def GetStrByIndex(self,int column):
+ * return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ * def GetStr(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetStr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":159
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ * def GetChar(self,str columnName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetCharByIndex (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 159, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_50GetCharByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ char *__pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("GetCharByIndex", 0);
+
+ /* "py_t2sdk.pyx":160
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ * def GetCharByIndex(self,int column):
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8') # <<<<<<<<<<<<<<
+ * def GetChar(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __pyx_v_self->lpUnpacker->GetCharByIndex(__pyx_v_column);
+ __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":159
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetStr(sName).decode('GBK')
+ * def GetCharByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ * def GetChar(self,str columnName):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetCharByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":161
+ * def GetCharByIndex(self,int column):
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ * def GetChar(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetChar (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 161, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_52GetChar(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("GetChar", 0);
+
+ /* "py_t2sdk.pyx":162
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ * def GetChar(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ * def GetDoubleByIndex(self, int column):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_UTF_8) < 0) __PYX_ERR(1, 162, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 162, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":163
+ * def GetChar(self,str columnName):
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8') # <<<<<<<<<<<<<<
+ * def GetDoubleByIndex(self, int column):
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 163, __pyx_L1_error)
+ __pyx_t_5 = __pyx_v_self->lpUnpacker->GetChar(__pyx_t_4);
+ __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":161
+ * def GetCharByIndex(self,int column):
+ * return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ * def GetChar(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetChar", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":164
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ * def GetDouble(self,str columnName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetDoubleByIndex (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 164, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_54GetDoubleByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetDoubleByIndex", 0);
+
+ /* "py_t2sdk.pyx":165
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ * def GetDoubleByIndex(self, int column):
+ * return self.lpUnpacker.GetDoubleByIndex(column) # <<<<<<<<<<<<<<
+ * def GetDouble(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDoubleByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":164
+ * sName = bytes(columnName,encoding='UTF-8')
+ * return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ * def GetDoubleByIndex(self, int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ * def GetDouble(self,str columnName):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDoubleByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":166
+ * def GetDoubleByIndex(self, int column):
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ * def GetDouble(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetDouble(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetDouble (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 166, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_56GetDouble(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("GetDouble", 0);
+
+ /* "py_t2sdk.pyx":167
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ * def GetDouble(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetDouble(sName)
+ * def GetIntByIndex(self,int column):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 167, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":168
+ * def GetDouble(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetDouble(sName) # <<<<<<<<<<<<<<
+ * def GetIntByIndex(self,int column):
+ * return self.lpUnpacker.GetIntByIndex(column)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 168, __pyx_L1_error)
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->lpUnpacker->GetDouble(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":166
+ * def GetDoubleByIndex(self, int column):
+ * return self.lpUnpacker.GetDoubleByIndex(column)
+ * def GetDouble(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetDouble(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetDouble", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":169
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetDouble(sName)
+ * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetIntByIndex(column)
+ * def GetInt(self,str columnName):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetIntByIndex (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 169, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_58GetIntByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetIntByIndex", 0);
+
+ /* "py_t2sdk.pyx":170
+ * return self.lpUnpacker.GetDouble(sName)
+ * def GetIntByIndex(self,int column):
+ * return self.lpUnpacker.GetIntByIndex(column) # <<<<<<<<<<<<<<
+ * def GetInt(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetIntByIndex(__pyx_v_column)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":169
+ * sName = bytes(columnName,encoding='utf-8')
+ * return self.lpUnpacker.GetDouble(sName)
+ * def GetIntByIndex(self,int column): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetIntByIndex(column)
+ * def GetInt(self,str columnName):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetIntByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":171
+ * def GetIntByIndex(self,int column):
+ * return self.lpUnpacker.GetIntByIndex(column)
+ * def GetInt(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * if self.lpUnpacker == NULL:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetInt (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 171, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_60GetInt(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("GetInt", 0);
+
+ /* "py_t2sdk.pyx":172
+ * return self.lpUnpacker.GetIntByIndex(column)
+ * def GetInt(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * if self.lpUnpacker == NULL:
+ * return -1
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 172, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":173
+ * def GetInt(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * return -1
+ * return self.lpUnpacker.GetInt(sName)
+ */
+ __pyx_t_4 = ((__pyx_v_self->lpUnpacker == NULL) != 0);
+ if (__pyx_t_4) {
+
+ /* "py_t2sdk.pyx":174
+ * sName = bytes(columnName,encoding='utf-8')
+ * if self.lpUnpacker == NULL:
+ * return -1 # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.GetInt(sName)
+ * def GetRawByIndex(self,int column):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __pyx_r = __pyx_int_neg_1;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":173
+ * def GetInt(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * if self.lpUnpacker == NULL: # <<<<<<<<<<<<<<
+ * return -1
+ * return self.lpUnpacker.GetInt(sName)
+ */
+ }
+
+ /* "py_t2sdk.pyx":175
+ * if self.lpUnpacker == NULL:
+ * return -1
+ * return self.lpUnpacker.GetInt(sName) # <<<<<<<<<<<<<<
+ * def GetRawByIndex(self,int column):
+ * cdef int ilength = 0
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 175, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->GetInt(__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 175, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":171
+ * def GetIntByIndex(self,int column):
+ * return self.lpUnpacker.GetIntByIndex(column)
+ * def GetInt(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * if self.lpUnpacker == NULL:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":176
+ * return -1
+ * return self.lpUnpacker.GetInt(sName)
+ * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<<
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_column) {
+ int __pyx_v_column;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetRawByIndex (wrapper)", 0);
+ assert(__pyx_arg_column); {
+ __pyx_v_column = __Pyx_PyInt_As_int(__pyx_arg_column); if (unlikely((__pyx_v_column == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 176, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((int)__pyx_v_column));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_62GetRawByIndex(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, int __pyx_v_column) {
+ int __pyx_v_ilength;
+ char *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("GetRawByIndex", 0);
+
+ /* "py_t2sdk.pyx":177
+ * return self.lpUnpacker.GetInt(sName)
+ * def GetRawByIndex(self,int column):
+ * cdef int ilength = 0 # <<<<<<<<<<<<<<
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ * lpBuff = []
+ */
+ __pyx_v_ilength = 0;
+
+ /* "py_t2sdk.pyx":178
+ * def GetRawByIndex(self,int column):
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength) # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef int iIndex = 0
+ */
+ __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRawByIndex(__pyx_v_column, (&__pyx_v_ilength));
+
+ /* "py_t2sdk.pyx":179
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":180
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ * lpBuff = []
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":181
+ * lpBuff = []
+ * cdef int iIndex = 0
+ * while iIndex < iLength: # <<<<<<<<<<<<<<
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ */
+ while (1) {
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 181, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 181, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) break;
+
+ /* "py_t2sdk.pyx":182
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff,ilength
+ */
+ __pyx_t_3 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_3); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(1, 182, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":183
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff,ilength
+ * def GetRaw(self,str columnName):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":184
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ * return lpBuff,ilength # <<<<<<<<<<<<<<
+ * def GetRaw(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_v_lpBuff);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":176
+ * return -1
+ * return self.lpUnpacker.GetInt(sName)
+ * def GetRawByIndex(self,int column): # <<<<<<<<<<<<<<
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRawByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":185
+ * iIndex +=1
+ * return lpBuff,ilength
+ * def GetRaw(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef int ilength = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw(PyObject *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetRaw (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_columnName), (&PyString_Type), 1, "columnName", 1))) __PYX_ERR(1, 185, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject*)__pyx_v_columnName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_64GetRaw(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, PyObject *__pyx_v_columnName) {
+ PyObject *__pyx_v_sName = NULL;
+ int __pyx_v_ilength;
+ char *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ __Pyx_RefNannySetupContext("GetRaw", 0);
+
+ /* "py_t2sdk.pyx":186
+ * return lpBuff,ilength
+ * def GetRaw(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_columnName);
+ __Pyx_GIVEREF(__pyx_v_columnName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_columnName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 186, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":187
+ * def GetRaw(self,str columnName):
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef int ilength = 0 # <<<<<<<<<<<<<<
+ * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength)
+ * lpBuff = []
+ */
+ __pyx_v_ilength = 0;
+
+ /* "py_t2sdk.pyx":188
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength) # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef int iIndex = 0
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 188, __pyx_L1_error)
+ __pyx_v_sBuff = __pyx_v_self->lpUnpacker->GetRaw(__pyx_t_4, (&__pyx_v_ilength));
+
+ /* "py_t2sdk.pyx":189
+ * cdef int ilength = 0
+ * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength)
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ */
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":190
+ * cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength)
+ * lpBuff = []
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":191
+ * lpBuff = []
+ * cdef int iIndex = 0
+ * while iIndex < iLength: # <<<<<<<<<<<<<<
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ */
+ while (1) {
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_iIndex); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_iLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (!__pyx_t_5) break;
+
+ /* "py_t2sdk.pyx":192
+ * cdef int iIndex = 0
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff,ilength
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 192, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":193
+ * while iIndex < iLength:
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff,ilength
+ * def WasNull(self):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":194
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ * return lpBuff,ilength # <<<<<<<<<<<<<<
+ * def WasNull(self):
+ * return self.lpUnpacker.WasNull()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ilength); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_v_lpBuff);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":185
+ * iIndex +=1
+ * return lpBuff,ilength
+ * def GetRaw(self,str columnName): # <<<<<<<<<<<<<<
+ * sName = bytes(columnName,encoding='utf-8')
+ * cdef int ilength = 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.GetRaw", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":195
+ * iIndex +=1
+ * return lpBuff,ilength
+ * def WasNull(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.WasNull()
+ * def Next(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("WasNull (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_66WasNull(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("WasNull", 0);
+
+ /* "py_t2sdk.pyx":196
+ * return lpBuff,ilength
+ * def WasNull(self):
+ * return self.lpUnpacker.WasNull() # <<<<<<<<<<<<<<
+ * def Next(self):
+ * self.lpUnpacker.Next()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->WasNull()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":195
+ * iIndex +=1
+ * return lpBuff,ilength
+ * def WasNull(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.WasNull()
+ * def Next(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.WasNull", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":197
+ * def WasNull(self):
+ * return self.lpUnpacker.WasNull()
+ * def Next(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Next()
+ * def IsEOF(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Next (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_68Next(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Next", 0);
+
+ /* "py_t2sdk.pyx":198
+ * return self.lpUnpacker.WasNull()
+ * def Next(self):
+ * self.lpUnpacker.Next() # <<<<<<<<<<<<<<
+ * def IsEOF(self):
+ * return self.lpUnpacker.IsEOF()
+ */
+ __pyx_v_self->lpUnpacker->Next();
+
+ /* "py_t2sdk.pyx":197
+ * def WasNull(self):
+ * return self.lpUnpacker.WasNull()
+ * def Next(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Next()
+ * def IsEOF(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":199
+ * def Next(self):
+ * self.lpUnpacker.Next()
+ * def IsEOF(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.IsEOF()
+ * def IsEmpty(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("IsEOF (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_70IsEOF(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("IsEOF", 0);
+
+ /* "py_t2sdk.pyx":200
+ * self.lpUnpacker.Next()
+ * def IsEOF(self):
+ * return self.lpUnpacker.IsEOF() # <<<<<<<<<<<<<<
+ * def IsEmpty(self):
+ * return self.lpUnpacker.IsEmpty()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEOF()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":199
+ * def Next(self):
+ * self.lpUnpacker.Next()
+ * def IsEOF(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.IsEOF()
+ * def IsEmpty(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEOF", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":201
+ * def IsEOF(self):
+ * return self.lpUnpacker.IsEOF()
+ * def IsEmpty(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.IsEmpty()
+ * def Destroy(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("IsEmpty (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_72IsEmpty(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("IsEmpty", 0);
+
+ /* "py_t2sdk.pyx":202
+ * return self.lpUnpacker.IsEOF()
+ * def IsEmpty(self):
+ * return self.lpUnpacker.IsEmpty() # <<<<<<<<<<<<<<
+ * def Destroy(self):
+ * self.lpUnpacker.Destroy()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpUnpacker->IsEmpty()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":201
+ * def IsEOF(self):
+ * return self.lpUnpacker.IsEOF()
+ * def IsEmpty(self): # <<<<<<<<<<<<<<
+ * return self.lpUnpacker.IsEmpty()
+ * def Destroy(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.IsEmpty", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":203
+ * def IsEmpty(self):
+ * return self.lpUnpacker.IsEmpty()
+ * def Destroy(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Destroy()
+ * def Release(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Destroy (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_74Destroy(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Destroy", 0);
+
+ /* "py_t2sdk.pyx":204
+ * return self.lpUnpacker.IsEmpty()
+ * def Destroy(self):
+ * self.lpUnpacker.Destroy() # <<<<<<<<<<<<<<
+ * def Release(self):
+ * if self.lpUnpacker != NULL:
+ */
+ __pyx_v_self->lpUnpacker->Destroy();
+
+ /* "py_t2sdk.pyx":203
+ * def IsEmpty(self):
+ * return self.lpUnpacker.IsEmpty()
+ * def Destroy(self): # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Destroy()
+ * def Release(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":205
+ * def Destroy(self):
+ * self.lpUnpacker.Destroy()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker != NULL:
+ * self.lpUnpacker.Release()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_76Release(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":206
+ * self.lpUnpacker.Destroy()
+ * def Release(self):
+ * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Release()
+ *
+ */
+ __pyx_t_1 = ((__pyx_v_self->lpUnpacker != NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":207
+ * def Release(self):
+ * if self.lpUnpacker != NULL:
+ * self.lpUnpacker.Release() # <<<<<<<<<<<<<<
+ *
+ * cdef class pyCConfigInterface:
+ */
+ __pyx_v_self->lpUnpacker->Release();
+
+ /* "py_t2sdk.pyx":206
+ * self.lpUnpacker.Destroy()
+ * def Release(self):
+ * if self.lpUnpacker != NULL: # <<<<<<<<<<<<<<
+ * self.lpUnpacker.Release()
+ *
+ */
+ }
+
+ /* "py_t2sdk.pyx":205
+ * def Destroy(self):
+ * self.lpUnpacker.Destroy()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * if self.lpUnpacker != NULL:
+ * self.lpUnpacker.Release()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_78__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIF2UnPacker_80__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIF2UnPacker.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":211
+ * cdef class pyCConfigInterface:
+ * cdef C_CConfigInterface* lpConfig
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpConfig = new C_CConfigInterface()
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_18pyCConfigInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ C_CConfigInterface *__pyx_t_1;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":212
+ * cdef C_CConfigInterface* lpConfig
+ * def __cinit__(self):
+ * self.lpConfig = new C_CConfigInterface() # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * del self.lpConfig
+ */
+ try {
+ __pyx_t_1 = new C_CConfigInterface();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 212, __pyx_L1_error)
+ }
+ __pyx_v_self->lpConfig = __pyx_t_1;
+
+ /* "py_t2sdk.pyx":211
+ * cdef class pyCConfigInterface:
+ * cdef C_CConfigInterface* lpConfig
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpConfig = new C_CConfigInterface()
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":213
+ * def __cinit__(self):
+ * self.lpConfig = new C_CConfigInterface()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpConfig
+ * def Load(self,str szFileName):
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_18pyCConfigInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":214
+ * self.lpConfig = new C_CConfigInterface()
+ * def __dealloc__(self):
+ * del self.lpConfig # <<<<<<<<<<<<<<
+ * def Load(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8')
+ */
+ delete __pyx_v_self->lpConfig;
+
+ /* "py_t2sdk.pyx":213
+ * def __cinit__(self):
+ * self.lpConfig = new C_CConfigInterface()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpConfig
+ * def Load(self,str szFileName):
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":215
+ * def __dealloc__(self):
+ * del self.lpConfig
+ * def Load(self,str szFileName): # <<<<<<<<<<<<<<
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Load(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Load (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 215, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_4Load(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("Load", 0);
+
+ /* "py_t2sdk.pyx":216
+ * del self.lpConfig
+ * def Load(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpConfig.Load(sName)
+ * def Save(self,str szFileName):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szFileName);
+ __Pyx_GIVEREF(__pyx_v_szFileName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 216, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":217
+ * def Load(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Load(sName) # <<<<<<<<<<<<<<
+ * def Save(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Load(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 217, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":215
+ * def __dealloc__(self):
+ * del self.lpConfig
+ * def Load(self,str szFileName): # <<<<<<<<<<<<<<
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Load(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Load", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":218
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Load(sName)
+ * def Save(self,str szFileName): # <<<<<<<<<<<<<<
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Save(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save(PyObject *__pyx_v_self, PyObject *__pyx_v_szFileName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Save (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szFileName), (&PyString_Type), 1, "szFileName", 1))) __PYX_ERR(1, 218, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szFileName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_6Save(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szFileName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("Save", 0);
+
+ /* "py_t2sdk.pyx":219
+ * return self.lpConfig.Load(sName)
+ * def Save(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpConfig.Save(sName)
+ * def GetString(self,str szSection,str szEntry,str szDefault):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szFileName);
+ __Pyx_GIVEREF(__pyx_v_szFileName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szFileName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 219, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":220
+ * def Save(self,str szFileName):
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Save(sName) # <<<<<<<<<<<<<<
+ * def GetString(self,str szSection,str szEntry,str szDefault):
+ * sSection = bytes(szSection,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->Save(__pyx_t_4)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":218
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Load(sName)
+ * def Save(self,str szFileName): # <<<<<<<<<<<<<<
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Save(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.Save", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":221
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Save(sName)
+ * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szSection = 0;
+ PyObject *__pyx_v_szEntry = 0;
+ PyObject *__pyx_v_szDefault = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetString (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szDefault,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 1); __PYX_ERR(1, 221, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szDefault)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, 2); __PYX_ERR(1, 221, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetString") < 0)) __PYX_ERR(1, 221, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_szSection = ((PyObject*)values[0]);
+ __pyx_v_szEntry = ((PyObject*)values[1]);
+ __pyx_v_szDefault = ((PyObject*)values[2]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("GetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 221, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 221, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 221, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szDefault), (&PyString_Type), 1, "szDefault", 1))) __PYX_ERR(1, 221, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szDefault);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_8GetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szDefault) {
+ PyObject *__pyx_v_sSection = NULL;
+ PyObject *__pyx_v_sEntry = NULL;
+ PyObject *__pyx_v_sDefault = NULL;
+ char *__pyx_v_sValue;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ char *__pyx_t_6;
+ __Pyx_RefNannySetupContext("GetString", 0);
+
+ /* "py_t2sdk.pyx":222
+ * return self.lpConfig.Save(sName)
+ * def GetString(self,str szSection,str szEntry,str szDefault):
+ * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sDefault = bytes(szDefault,encoding='utf-8')
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szSection);
+ __Pyx_GIVEREF(__pyx_v_szSection);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 222, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sSection = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":223
+ * def GetString(self,str szSection,str szEntry,str szDefault):
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sDefault = bytes(szDefault,encoding='utf-8')
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_szEntry);
+ __Pyx_GIVEREF(__pyx_v_szEntry);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 223, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sEntry = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":224
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sDefault = bytes(szDefault,encoding='utf-8') # <<<<<<<<<<<<<<
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ * return sValue
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szDefault);
+ __Pyx_GIVEREF(__pyx_v_szDefault);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szDefault);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 224, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sDefault = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":225
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sDefault = bytes(szDefault,encoding='utf-8')
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault) # <<<<<<<<<<<<<<
+ * return sValue
+ * def GetInt(self,str szSection,str szEntry, int iDefault):
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sDefault); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 225, __pyx_L1_error)
+ __pyx_v_sValue = __pyx_v_self->lpConfig->GetString(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+
+ /* "py_t2sdk.pyx":226
+ * sDefault = bytes(szDefault,encoding='utf-8')
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ * return sValue # <<<<<<<<<<<<<<
+ * def GetInt(self,str szSection,str szEntry, int iDefault):
+ * sSection = bytes(szSection,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":221
+ * sName = bytes(szFileName,encoding='utf-8')
+ * return self.lpConfig.Save(sName)
+ * def GetString(self,str szSection,str szEntry,str szDefault): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetString", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sSection);
+ __Pyx_XDECREF(__pyx_v_sEntry);
+ __Pyx_XDECREF(__pyx_v_sDefault);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":227
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ * return sValue
+ * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szSection = 0;
+ PyObject *__pyx_v_szEntry = 0;
+ int __pyx_v_iDefault;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetInt (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iDefault,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 1); __PYX_ERR(1, 227, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iDefault)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, 2); __PYX_ERR(1, 227, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetInt") < 0)) __PYX_ERR(1, 227, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_szSection = ((PyObject*)values[0]);
+ __pyx_v_szEntry = ((PyObject*)values[1]);
+ __pyx_v_iDefault = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iDefault == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 227, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("GetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 227, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 227, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 227, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iDefault);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_10GetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iDefault) {
+ PyObject *__pyx_v_sSection = NULL;
+ PyObject *__pyx_v_sEntry = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("GetInt", 0);
+
+ /* "py_t2sdk.pyx":228
+ * return sValue
+ * def GetInt(self,str szSection,str szEntry, int iDefault):
+ * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szSection);
+ __Pyx_GIVEREF(__pyx_v_szSection);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 228, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sSection = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":229
+ * def GetInt(self,str szSection,str szEntry, int iDefault):
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ * def SetString(self,str szSection,str szEntry,str szValue):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_szEntry);
+ __Pyx_GIVEREF(__pyx_v_szEntry);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 229, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sEntry = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":230
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault) # <<<<<<<<<<<<<<
+ * def SetString(self,str szSection,str szEntry,str szValue):
+ * sSection = bytes(szSection,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->GetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iDefault)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":227
+ * cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ * return sValue
+ * def GetInt(self,str szSection,str szEntry, int iDefault): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.GetInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sSection);
+ __Pyx_XDECREF(__pyx_v_sEntry);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":231
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szSection = 0;
+ PyObject *__pyx_v_szEntry = 0;
+ PyObject *__pyx_v_szValue = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetString (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_szValue,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 1); __PYX_ERR(1, 231, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szValue)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, 2); __PYX_ERR(1, 231, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetString") < 0)) __PYX_ERR(1, 231, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_szSection = ((PyObject*)values[0]);
+ __pyx_v_szEntry = ((PyObject*)values[1]);
+ __pyx_v_szValue = ((PyObject*)values[2]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetString", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 231, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 231, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 231, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szValue), (&PyString_Type), 1, "szValue", 1))) __PYX_ERR(1, 231, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_szValue);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_12SetString(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, PyObject *__pyx_v_szValue) {
+ PyObject *__pyx_v_sSection = NULL;
+ PyObject *__pyx_v_sEntry = NULL;
+ PyObject *__pyx_v_sValue = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ char *__pyx_t_6;
+ __Pyx_RefNannySetupContext("SetString", 0);
+
+ /* "py_t2sdk.pyx":232
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ * def SetString(self,str szSection,str szEntry,str szValue):
+ * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sValue = bytes(szValue,encoding='utf-8')
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szSection);
+ __Pyx_GIVEREF(__pyx_v_szSection);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 232, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sSection = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":233
+ * def SetString(self,str szSection,str szEntry,str szValue):
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpConfig.SetString(sSection,sEntry,sValue)
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_szEntry);
+ __Pyx_GIVEREF(__pyx_v_szEntry);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 233, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sEntry = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":234
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sValue = bytes(szValue,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpConfig.SetString(sSection,sEntry,sValue)
+ * def SetInt(self,str szSection,str szEntry, int iValue):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szValue);
+ __Pyx_GIVEREF(__pyx_v_szValue);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szValue);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 234, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sValue = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":235
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpConfig.SetString(sSection,sEntry,sValue) # <<<<<<<<<<<<<<
+ * def SetInt(self,str szSection,str szEntry, int iValue):
+ * sSection = bytes(szSection,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(1, 235, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetString(__pyx_t_4, __pyx_t_5, __pyx_t_6)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":231
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ * def SetString(self,str szSection,str szEntry,str szValue): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetString", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sSection);
+ __Pyx_XDECREF(__pyx_v_sEntry);
+ __Pyx_XDECREF(__pyx_v_sValue);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":236
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpConfig.SetString(sSection,sEntry,sValue)
+ * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_szSection = 0;
+ PyObject *__pyx_v_szEntry = 0;
+ int __pyx_v_iValue;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetInt (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_szSection,&__pyx_n_s_szEntry,&__pyx_n_s_iValue,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szSection)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_szEntry)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 1); __PYX_ERR(1, 236, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iValue)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, 2); __PYX_ERR(1, 236, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetInt") < 0)) __PYX_ERR(1, 236, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_szSection = ((PyObject*)values[0]);
+ __pyx_v_szEntry = ((PyObject*)values[1]);
+ __pyx_v_iValue = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iValue == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetInt", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 236, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szSection), (&PyString_Type), 1, "szSection", 1))) __PYX_ERR(1, 236, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szEntry), (&PyString_Type), 1, "szEntry", 1))) __PYX_ERR(1, 236, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), __pyx_v_szSection, __pyx_v_szEntry, __pyx_v_iValue);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_14SetInt(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, PyObject *__pyx_v_szSection, PyObject *__pyx_v_szEntry, int __pyx_v_iValue) {
+ PyObject *__pyx_v_sSection = NULL;
+ PyObject *__pyx_v_sEntry = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("SetInt", 0);
+
+ /* "py_t2sdk.pyx":237
+ * return self.lpConfig.SetString(sSection,sEntry,sValue)
+ * def SetInt(self,str szSection,str szEntry, int iValue):
+ * sSection = bytes(szSection,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szSection);
+ __Pyx_GIVEREF(__pyx_v_szSection);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szSection);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 237, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sSection = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":238
+ * def SetInt(self,str szSection,str szEntry, int iValue):
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8') # <<<<<<<<<<<<<<
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ * def Release(self):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_szEntry);
+ __Pyx_GIVEREF(__pyx_v_szEntry);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_szEntry);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 238, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sEntry = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":239
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue) # <<<<<<<<<<<<<<
+ * def Release(self):
+ * self.lpConfig.Release()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sSection); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sEntry); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 239, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConfig->SetInt(__pyx_t_4, __pyx_t_5, __pyx_v_iValue)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":236
+ * sValue = bytes(szValue,encoding='utf-8')
+ * return self.lpConfig.SetString(sSection,sEntry,sValue)
+ * def SetInt(self,str szSection,str szEntry, int iValue): # <<<<<<<<<<<<<<
+ * sSection = bytes(szSection,encoding='utf-8')
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.SetInt", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sSection);
+ __Pyx_XDECREF(__pyx_v_sEntry);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":240
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpConfig.Release()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_16Release(struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":241
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ * def Release(self):
+ * self.lpConfig.Release() # <<<<<<<<<<<<<<
+ *
+ * cdef class pyIBizMessage:
+ */
+ __pyx_v_self->lpConfig->Release();
+
+ /* "py_t2sdk.pyx":240
+ * sEntry = bytes(szEntry,encoding='utf-8')
+ * return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpConfig.Release()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_18pyCConfigInterface_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyCConfigInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":245
+ * cdef class pyIBizMessage:
+ * cdef c_IBizMessage* lpBizMessage
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage = new c_IBizMessage()
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_13pyIBizMessage___cinit__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ c_IBizMessage *__pyx_t_1;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":246
+ * cdef c_IBizMessage* lpBizMessage
+ * def __cinit__(self):
+ * self.lpBizMessage = new c_IBizMessage() # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * del self.lpBizMessage
+ */
+ try {
+ __pyx_t_1 = new c_IBizMessage();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 246, __pyx_L1_error)
+ }
+ __pyx_v_self->lpBizMessage = __pyx_t_1;
+
+ /* "py_t2sdk.pyx":245
+ * cdef class pyIBizMessage:
+ * cdef c_IBizMessage* lpBizMessage
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage = new c_IBizMessage()
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":247
+ * def __cinit__(self):
+ * self.lpBizMessage = new c_IBizMessage()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpBizMessage
+ * def SetFunction(self,int nFUnctionNo):
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_13pyIBizMessage_2__dealloc__(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":248
+ * self.lpBizMessage = new c_IBizMessage()
+ * def __dealloc__(self):
+ * del self.lpBizMessage # <<<<<<<<<<<<<<
+ * def SetFunction(self,int nFUnctionNo):
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ */
+ delete __pyx_v_self->lpBizMessage;
+
+ /* "py_t2sdk.pyx":247
+ * def __cinit__(self):
+ * self.lpBizMessage = new c_IBizMessage()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpBizMessage
+ * def SetFunction(self,int nFUnctionNo):
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":249
+ * def __dealloc__(self):
+ * del self.lpBizMessage
+ * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ * def GetFunction(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction(PyObject *__pyx_v_self, PyObject *__pyx_arg_nFUnctionNo) {
+ int __pyx_v_nFUnctionNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetFunction (wrapper)", 0);
+ assert(__pyx_arg_nFUnctionNo); {
+ __pyx_v_nFUnctionNo = __Pyx_PyInt_As_int(__pyx_arg_nFUnctionNo); if (unlikely((__pyx_v_nFUnctionNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nFUnctionNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_4SetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nFUnctionNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetFunction", 0);
+
+ /* "py_t2sdk.pyx":250
+ * del self.lpBizMessage
+ * def SetFunction(self,int nFUnctionNo):
+ * self.lpBizMessage.SetFunction(nFUnctionNo) # <<<<<<<<<<<<<<
+ * def GetFunction(self):
+ * return self.lpBizMessage.GetFunction()
+ */
+ __pyx_v_self->lpBizMessage->SetFunction(__pyx_v_nFUnctionNo);
+
+ /* "py_t2sdk.pyx":249
+ * def __dealloc__(self):
+ * del self.lpBizMessage
+ * def SetFunction(self,int nFUnctionNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ * def GetFunction(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":251
+ * def SetFunction(self,int nFUnctionNo):
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ * def GetFunction(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetFunction()
+ * def SetPacketType(self,int nPacketType):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFunction (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_6GetFunction(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetFunction", 0);
+
+ /* "py_t2sdk.pyx":252
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ * def GetFunction(self):
+ * return self.lpBizMessage.GetFunction() # <<<<<<<<<<<<<<
+ * def SetPacketType(self,int nPacketType):
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetFunction()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":251
+ * def SetFunction(self,int nFUnctionNo):
+ * self.lpBizMessage.SetFunction(nFUnctionNo)
+ * def GetFunction(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetFunction()
+ * def SetPacketType(self,int nPacketType):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":253
+ * def GetFunction(self):
+ * return self.lpBizMessage.GetFunction()
+ * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ * def GetPacketType(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketType) {
+ int __pyx_v_nPacketType;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetPacketType (wrapper)", 0);
+ assert(__pyx_arg_nPacketType); {
+ __pyx_v_nPacketType = __Pyx_PyInt_As_int(__pyx_arg_nPacketType); if (unlikely((__pyx_v_nPacketType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 253, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketType));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_8SetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketType) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetPacketType", 0);
+
+ /* "py_t2sdk.pyx":254
+ * return self.lpBizMessage.GetFunction()
+ * def SetPacketType(self,int nPacketType):
+ * self.lpBizMessage.SetPacketType(nPacketType) # <<<<<<<<<<<<<<
+ * def GetPacketType(self):
+ * return self.lpBizMessage.GetPacketType()
+ */
+ __pyx_v_self->lpBizMessage->SetPacketType(__pyx_v_nPacketType);
+
+ /* "py_t2sdk.pyx":253
+ * def GetFunction(self):
+ * return self.lpBizMessage.GetFunction()
+ * def SetPacketType(self,int nPacketType): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ * def GetPacketType(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":255
+ * def SetPacketType(self,int nPacketType):
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ * def GetPacketType(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetPacketType()
+ * def SetBranchNo(self,int nBranchNo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPacketType (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_10GetPacketType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPacketType", 0);
+
+ /* "py_t2sdk.pyx":256
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ * def GetPacketType(self):
+ * return self.lpBizMessage.GetPacketType() # <<<<<<<<<<<<<<
+ * def SetBranchNo(self,int nBranchNo):
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 256, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":255
+ * def SetPacketType(self,int nPacketType):
+ * self.lpBizMessage.SetPacketType(nPacketType)
+ * def GetPacketType(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetPacketType()
+ * def SetBranchNo(self,int nBranchNo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":257
+ * def GetPacketType(self):
+ * return self.lpBizMessage.GetPacketType()
+ * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ * def GetBranchNo(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nBranchNo) {
+ int __pyx_v_nBranchNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetBranchNo (wrapper)", 0);
+ assert(__pyx_arg_nBranchNo); {
+ __pyx_v_nBranchNo = __Pyx_PyInt_As_int(__pyx_arg_nBranchNo); if (unlikely((__pyx_v_nBranchNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nBranchNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_12SetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nBranchNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetBranchNo", 0);
+
+ /* "py_t2sdk.pyx":258
+ * return self.lpBizMessage.GetPacketType()
+ * def SetBranchNo(self,int nBranchNo):
+ * self.lpBizMessage.SetBranchNo(nBranchNo) # <<<<<<<<<<<<<<
+ * def GetBranchNo(self):
+ * return self.lpBizMessage.GetBranchNo()
+ */
+ __pyx_v_self->lpBizMessage->SetBranchNo(__pyx_v_nBranchNo);
+
+ /* "py_t2sdk.pyx":257
+ * def GetPacketType(self):
+ * return self.lpBizMessage.GetPacketType()
+ * def SetBranchNo(self,int nBranchNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ * def GetBranchNo(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":259
+ * def SetBranchNo(self,int nBranchNo):
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ * def GetBranchNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetBranchNo()
+ * def SetSystemNo(self,int nSystemNo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetBranchNo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_14GetBranchNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetBranchNo", 0);
+
+ /* "py_t2sdk.pyx":260
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ * def GetBranchNo(self):
+ * return self.lpBizMessage.GetBranchNo() # <<<<<<<<<<<<<<
+ * def SetSystemNo(self,int nSystemNo):
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetBranchNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":259
+ * def SetBranchNo(self,int nBranchNo):
+ * self.lpBizMessage.SetBranchNo(nBranchNo)
+ * def GetBranchNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetBranchNo()
+ * def SetSystemNo(self,int nSystemNo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBranchNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":261
+ * def GetBranchNo(self):
+ * return self.lpBizMessage.GetBranchNo()
+ * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ * def GetSystemNo(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSystemNo) {
+ int __pyx_v_nSystemNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSystemNo (wrapper)", 0);
+ assert(__pyx_arg_nSystemNo); {
+ __pyx_v_nSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSystemNo); if (unlikely((__pyx_v_nSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 261, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSystemNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_16SetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSystemNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSystemNo", 0);
+
+ /* "py_t2sdk.pyx":262
+ * return self.lpBizMessage.GetBranchNo()
+ * def SetSystemNo(self,int nSystemNo):
+ * self.lpBizMessage.SetSystemNo(nSystemNo) # <<<<<<<<<<<<<<
+ * def GetSystemNo(self):
+ * return self.lpBizMessage.GetSystemNo()
+ */
+ __pyx_v_self->lpBizMessage->SetSystemNo(__pyx_v_nSystemNo);
+
+ /* "py_t2sdk.pyx":261
+ * def GetBranchNo(self):
+ * return self.lpBizMessage.GetBranchNo()
+ * def SetSystemNo(self,int nSystemNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ * def GetSystemNo(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":263
+ * def SetSystemNo(self,int nSystemNo):
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ * def GetSystemNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSystemNo()
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSystemNo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_18GetSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSystemNo", 0);
+
+ /* "py_t2sdk.pyx":264
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ * def GetSystemNo(self):
+ * return self.lpBizMessage.GetSystemNo() # <<<<<<<<<<<<<<
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 264, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":263
+ * def SetSystemNo(self,int nSystemNo):
+ * self.lpBizMessage.SetSystemNo(nSystemNo)
+ * def GetSystemNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSystemNo()
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":265
+ * def GetSystemNo(self):
+ * return self.lpBizMessage.GetSystemNo()
+ * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ * def GetSubSystemNo(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSubSystemNo) {
+ int __pyx_v_nSubSystemNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSubSystemNo (wrapper)", 0);
+ assert(__pyx_arg_nSubSystemNo); {
+ __pyx_v_nSubSystemNo = __Pyx_PyInt_As_int(__pyx_arg_nSubSystemNo); if (unlikely((__pyx_v_nSubSystemNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 265, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSubSystemNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_20SetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSubSystemNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSubSystemNo", 0);
+
+ /* "py_t2sdk.pyx":266
+ * return self.lpBizMessage.GetSystemNo()
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo) # <<<<<<<<<<<<<<
+ * def GetSubSystemNo(self):
+ * return self.lpBizMessage.GetSubSystemNo()
+ */
+ __pyx_v_self->lpBizMessage->SetSubSystemNo(__pyx_v_nSubSystemNo);
+
+ /* "py_t2sdk.pyx":265
+ * def GetSystemNo(self):
+ * return self.lpBizMessage.GetSystemNo()
+ * def SetSubSystemNo(self,int nSubSystemNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ * def GetSubSystemNo(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":267
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ * def GetSubSystemNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSubSystemNo()
+ * def SetSenderId(self,int nSenderId):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSubSystemNo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_22GetSubSystemNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSubSystemNo", 0);
+
+ /* "py_t2sdk.pyx":268
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ * def GetSubSystemNo(self):
+ * return self.lpBizMessage.GetSubSystemNo() # <<<<<<<<<<<<<<
+ * def SetSenderId(self,int nSenderId):
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSubSystemNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":267
+ * def SetSubSystemNo(self,int nSubSystemNo):
+ * self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ * def GetSubSystemNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSubSystemNo()
+ * def SetSenderId(self,int nSenderId):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSubSystemNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":269
+ * def GetSubSystemNo(self):
+ * return self.lpBizMessage.GetSubSystemNo()
+ * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ * def GetSenderId(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSenderId) {
+ int __pyx_v_nSenderId;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSenderId (wrapper)", 0);
+ assert(__pyx_arg_nSenderId); {
+ __pyx_v_nSenderId = __Pyx_PyInt_As_int(__pyx_arg_nSenderId); if (unlikely((__pyx_v_nSenderId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 269, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSenderId));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_24SetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSenderId) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSenderId", 0);
+
+ /* "py_t2sdk.pyx":270
+ * return self.lpBizMessage.GetSubSystemNo()
+ * def SetSenderId(self,int nSenderId):
+ * self.lpBizMessage.SetSenderId(nSenderId) # <<<<<<<<<<<<<<
+ * def GetSenderId(self):
+ * return self.lpBizMessage.GetSenderId()
+ */
+ __pyx_v_self->lpBizMessage->SetSenderId(__pyx_v_nSenderId);
+
+ /* "py_t2sdk.pyx":269
+ * def GetSubSystemNo(self):
+ * return self.lpBizMessage.GetSubSystemNo()
+ * def SetSenderId(self,int nSenderId): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ * def GetSenderId(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":271
+ * def SetSenderId(self,int nSenderId):
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ * def GetSenderId(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSenderId()
+ * def SetPacketId(self,int nPacketId):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSenderId (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_26GetSenderId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSenderId", 0);
+
+ /* "py_t2sdk.pyx":272
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ * def GetSenderId(self):
+ * return self.lpBizMessage.GetSenderId() # <<<<<<<<<<<<<<
+ * def SetPacketId(self,int nPacketId):
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSenderId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":271
+ * def SetSenderId(self,int nSenderId):
+ * self.lpBizMessage.SetSenderId(nSenderId)
+ * def GetSenderId(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSenderId()
+ * def SetPacketId(self,int nPacketId):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSenderId", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":273
+ * def GetSenderId(self):
+ * return self.lpBizMessage.GetSenderId()
+ * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ * def GetPacketId(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId(PyObject *__pyx_v_self, PyObject *__pyx_arg_nPacketId) {
+ int __pyx_v_nPacketId;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetPacketId (wrapper)", 0);
+ assert(__pyx_arg_nPacketId); {
+ __pyx_v_nPacketId = __Pyx_PyInt_As_int(__pyx_arg_nPacketId); if (unlikely((__pyx_v_nPacketId == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nPacketId));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_28SetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nPacketId) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetPacketId", 0);
+
+ /* "py_t2sdk.pyx":274
+ * return self.lpBizMessage.GetSenderId()
+ * def SetPacketId(self,int nPacketId):
+ * self.lpBizMessage.SetPacketId(nPacketId) # <<<<<<<<<<<<<<
+ * def GetPacketId(self):
+ * return self.lpBizMessage.GetPacketId()
+ */
+ __pyx_v_self->lpBizMessage->SetPacketId(__pyx_v_nPacketId);
+
+ /* "py_t2sdk.pyx":273
+ * def GetSenderId(self):
+ * return self.lpBizMessage.GetSenderId()
+ * def SetPacketId(self,int nPacketId): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ * def GetPacketId(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":275
+ * def SetPacketId(self,int nPacketId):
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ * def GetPacketId(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetPacketId()
+ * def SetErrorNo(self,int nErrorNo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetPacketId (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_30GetPacketId(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetPacketId", 0);
+
+ /* "py_t2sdk.pyx":276
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ * def GetPacketId(self):
+ * return self.lpBizMessage.GetPacketId() # <<<<<<<<<<<<<<
+ * def SetErrorNo(self,int nErrorNo):
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetPacketId()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":275
+ * def SetPacketId(self,int nPacketId):
+ * self.lpBizMessage.SetPacketId(nPacketId)
+ * def GetPacketId(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetPacketId()
+ * def SetErrorNo(self,int nErrorNo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetPacketId", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":277
+ * def GetPacketId(self):
+ * return self.lpBizMessage.GetPacketId()
+ * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ * def GetErrorNo(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorNo) {
+ int __pyx_v_nErrorNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetErrorNo (wrapper)", 0);
+ assert(__pyx_arg_nErrorNo); {
+ __pyx_v_nErrorNo = __Pyx_PyInt_As_int(__pyx_arg_nErrorNo); if (unlikely((__pyx_v_nErrorNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nErrorNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_32SetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nErrorNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetErrorNo", 0);
+
+ /* "py_t2sdk.pyx":278
+ * return self.lpBizMessage.GetPacketId()
+ * def SetErrorNo(self,int nErrorNo):
+ * self.lpBizMessage.SetErrorNo(nErrorNo) # <<<<<<<<<<<<<<
+ * def GetErrorNo(self):
+ * return self.lpBizMessage.GetErrorNo()
+ */
+ __pyx_v_self->lpBizMessage->SetErrorNo(__pyx_v_nErrorNo);
+
+ /* "py_t2sdk.pyx":277
+ * def GetPacketId(self):
+ * return self.lpBizMessage.GetPacketId()
+ * def SetErrorNo(self,int nErrorNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ * def GetErrorNo(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":279
+ * def SetErrorNo(self,int nErrorNo):
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ * def GetErrorNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetErrorNo()
+ * def SetErrorInfo(self,str strErrorInfo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetErrorNo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_34GetErrorNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetErrorNo", 0);
+
+ /* "py_t2sdk.pyx":280
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ * def GetErrorNo(self):
+ * return self.lpBizMessage.GetErrorNo() # <<<<<<<<<<<<<<
+ * def SetErrorInfo(self,str strErrorInfo):
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetErrorNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":279
+ * def SetErrorNo(self,int nErrorNo):
+ * self.lpBizMessage.SetErrorNo(nErrorNo)
+ * def GetErrorNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetErrorNo()
+ * def SetErrorInfo(self,str strErrorInfo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":281
+ * def GetErrorNo(self):
+ * return self.lpBizMessage.GetErrorNo()
+ * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<<
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo(PyObject *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetErrorInfo (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strErrorInfo), (&PyString_Type), 1, "strErrorInfo", 1))) __PYX_ERR(1, 281, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject*)__pyx_v_strErrorInfo));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_36SetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_strErrorInfo) {
+ PyObject *__pyx_v_sErrorInfo = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetErrorInfo", 0);
+
+ /* "py_t2sdk.pyx":282
+ * return self.lpBizMessage.GetErrorNo()
+ * def SetErrorInfo(self,str strErrorInfo):
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ * def GetErrorInfo(self):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_strErrorInfo);
+ __Pyx_GIVEREF(__pyx_v_strErrorInfo);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strErrorInfo);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 282, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sErrorInfo = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":283
+ * def SetErrorInfo(self,str strErrorInfo):
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo) # <<<<<<<<<<<<<<
+ * def GetErrorInfo(self):
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sErrorInfo); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 283, __pyx_L1_error)
+ __pyx_v_self->lpBizMessage->SetErrorInfo(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":281
+ * def GetErrorNo(self):
+ * return self.lpBizMessage.GetErrorNo()
+ * def SetErrorInfo(self,str strErrorInfo): # <<<<<<<<<<<<<<
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sErrorInfo);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":284
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ * def GetErrorInfo(self): # <<<<<<<<<<<<<<
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ * return sErrInfo
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetErrorInfo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_38GetErrorInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ char *__pyx_v_sErrInfo;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetErrorInfo", 0);
+
+ /* "py_t2sdk.pyx":285
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ * def GetErrorInfo(self):
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo() # <<<<<<<<<<<<<<
+ * return sErrInfo
+ * def SetReturnCode(self,int nReturnCode):
+ */
+ __pyx_v_sErrInfo = __pyx_v_self->lpBizMessage->GetErrorInfo();
+
+ /* "py_t2sdk.pyx":286
+ * def GetErrorInfo(self):
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ * return sErrInfo # <<<<<<<<<<<<<<
+ * def SetReturnCode(self,int nReturnCode):
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sErrInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 286, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":284
+ * sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ * self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ * def GetErrorInfo(self): # <<<<<<<<<<<<<<
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ * return sErrInfo
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetErrorInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":287
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ * return sErrInfo
+ * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ * def GetReturnCode(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode(PyObject *__pyx_v_self, PyObject *__pyx_arg_nReturnCode) {
+ int __pyx_v_nReturnCode;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReturnCode (wrapper)", 0);
+ assert(__pyx_arg_nReturnCode); {
+ __pyx_v_nReturnCode = __Pyx_PyInt_As_int(__pyx_arg_nReturnCode); if (unlikely((__pyx_v_nReturnCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 287, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nReturnCode));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_40SetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nReturnCode) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReturnCode", 0);
+
+ /* "py_t2sdk.pyx":288
+ * return sErrInfo
+ * def SetReturnCode(self,int nReturnCode):
+ * self.lpBizMessage.SetReturnCode(nReturnCode) # <<<<<<<<<<<<<<
+ * def GetReturnCode(self):
+ * return self.lpBizMessage.GetReturnCode()
+ */
+ __pyx_v_self->lpBizMessage->SetReturnCode(__pyx_v_nReturnCode);
+
+ /* "py_t2sdk.pyx":287
+ * cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ * return sErrInfo
+ * def SetReturnCode(self,int nReturnCode): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ * def GetReturnCode(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":289
+ * def SetReturnCode(self,int nReturnCode):
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ * def GetReturnCode(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetReturnCode()
+ * def SetContent(self,list lpContent,int iLen):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetReturnCode (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_42GetReturnCode(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetReturnCode", 0);
+
+ /* "py_t2sdk.pyx":290
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ * def GetReturnCode(self):
+ * return self.lpBizMessage.GetReturnCode() # <<<<<<<<<<<<<<
+ * def SetContent(self,list lpContent,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetReturnCode()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":289
+ * def SetReturnCode(self,int nReturnCode):
+ * self.lpBizMessage.SetReturnCode(nReturnCode)
+ * def GetReturnCode(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetReturnCode()
+ * def SetContent(self,list lpContent,int iLen):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetReturnCode", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":291
+ * def GetReturnCode(self):
+ * return self.lpBizMessage.GetReturnCode()
+ * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpContent = 0;
+ int __pyx_v_iLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetContent (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpContent,&__pyx_n_s_iLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpContent)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, 1); __PYX_ERR(1, 291, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetContent") < 0)) __PYX_ERR(1, 291, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpContent = ((PyObject*)values[0]);
+ __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetContent", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 291, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpContent), (&PyList_Type), 1, "lpContent", 1))) __PYX_ERR(1, 291, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpContent, __pyx_v_iLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_44SetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpContent, int __pyx_v_iLen) {
+ char *__pyx_v_sBuff;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ char __pyx_t_3;
+ __Pyx_RefNannySetupContext("SetContent", 0);
+
+ /* "py_t2sdk.pyx":292
+ * return self.lpBizMessage.GetReturnCode()
+ * def SetContent(self,list lpContent,int iLen):
+ * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen));
+
+ /* "py_t2sdk.pyx":293
+ * def SetContent(self,list lpContent,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpContent[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":294
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * sBuff[iIndex] = lpContent[iIndex]
+ * iIndex+=1
+ */
+ while (1) {
+ __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_1) break;
+
+ /* "py_t2sdk.pyx":295
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpContent[iIndex] # <<<<<<<<<<<<<<
+ * iIndex+=1
+ * self.lpBizMessage.SetContent(sBuff,iLen)
+ */
+ if (unlikely(__pyx_v_lpContent == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 295, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpContent, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3;
+
+ /* "py_t2sdk.pyx":296
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpContent[iIndex]
+ * iIndex+=1 # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetContent(sBuff,iLen)
+ * free(sBuff)
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":297
+ * sBuff[iIndex] = lpContent[iIndex]
+ * iIndex+=1
+ * self.lpBizMessage.SetContent(sBuff,iLen) # <<<<<<<<<<<<<<
+ * free(sBuff)
+ * def GetContent(self):
+ */
+ __pyx_v_self->lpBizMessage->SetContent(__pyx_v_sBuff, __pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":298
+ * iIndex+=1
+ * self.lpBizMessage.SetContent(sBuff,iLen)
+ * free(sBuff) # <<<<<<<<<<<<<<
+ * def GetContent(self):
+ * cdef int iLen = 0
+ */
+ free(__pyx_v_sBuff);
+
+ /* "py_t2sdk.pyx":291
+ * def GetReturnCode(self):
+ * return self.lpBizMessage.GetReturnCode()
+ * def SetContent(self,list lpContent,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetContent", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":299
+ * self.lpBizMessage.SetContent(sBuff,iLen)
+ * free(sBuff)
+ * def GetContent(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetContent (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_46GetContent(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ int __pyx_v_iLen;
+ char *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ PyObject *__pyx_v_iTemp = 0;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("GetContent", 0);
+
+ /* "py_t2sdk.pyx":300
+ * free(sBuff)
+ * def GetContent(self):
+ * cdef int iLen = 0 # <<<<<<<<<<<<<<
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ * lpBuff = []
+ */
+ __pyx_v_iLen = 0;
+
+ /* "py_t2sdk.pyx":301
+ * def GetContent(self):
+ * cdef int iLen = 0
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen) # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef iTemp = 0
+ */
+ __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetContent(__pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":302
+ * cdef int iLen = 0
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef iTemp = 0
+ * cdef int iIndex = 0
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":303
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ * lpBuff = []
+ * cdef iTemp = 0 # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_iTemp = __pyx_int_0;
+
+ /* "py_t2sdk.pyx":304
+ * lpBuff = []
+ * cdef iTemp = 0
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":305
+ * cdef iTemp = 0
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp)
+ */
+ while (1) {
+ __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_2) break;
+
+ /* "py_t2sdk.pyx":306
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<<
+ * lpBuff.append(iTemp)
+ * iIndex +=1
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 306, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":307
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff,iLen
+ */
+ __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 307, __pyx_L1_error)
+
+ /* "py_t2sdk.pyx":308
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp)
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff,iLen
+ * def SetIssueType(self,int nIssueType):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":309
+ * lpBuff.append(iTemp)
+ * iIndex +=1
+ * return lpBuff,iLen # <<<<<<<<<<<<<<
+ * def SetIssueType(self,int nIssueType):
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_v_lpBuff);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":299
+ * self.lpBizMessage.SetContent(sBuff,iLen)
+ * free(sBuff)
+ * def GetContent(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetContent", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XDECREF(__pyx_v_iTemp);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":310
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ * def GetIssueType(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType(PyObject *__pyx_v_self, PyObject *__pyx_arg_nIssueType) {
+ int __pyx_v_nIssueType;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetIssueType (wrapper)", 0);
+ assert(__pyx_arg_nIssueType); {
+ __pyx_v_nIssueType = __Pyx_PyInt_As_int(__pyx_arg_nIssueType); if (unlikely((__pyx_v_nIssueType == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nIssueType));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_48SetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nIssueType) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetIssueType", 0);
+
+ /* "py_t2sdk.pyx":311
+ * return lpBuff,iLen
+ * def SetIssueType(self,int nIssueType):
+ * self.lpBizMessage.SetIssueType(nIssueType) # <<<<<<<<<<<<<<
+ * def GetIssueType(self):
+ * return self.lpBizMessage.GetIssueType()
+ */
+ __pyx_v_self->lpBizMessage->SetIssueType(__pyx_v_nIssueType);
+
+ /* "py_t2sdk.pyx":310
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetIssueType(self,int nIssueType): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ * def GetIssueType(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":312
+ * def SetIssueType(self,int nIssueType):
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ * def GetIssueType(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetIssueType()
+ * def SetSequeceNo(self,int nSequeceNo):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetIssueType (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_50GetIssueType(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetIssueType", 0);
+
+ /* "py_t2sdk.pyx":313
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ * def GetIssueType(self):
+ * return self.lpBizMessage.GetIssueType() # <<<<<<<<<<<<<<
+ * def SetSequeceNo(self,int nSequeceNo):
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetIssueType()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":312
+ * def SetIssueType(self,int nIssueType):
+ * self.lpBizMessage.SetIssueType(nIssueType)
+ * def GetIssueType(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetIssueType()
+ * def SetSequeceNo(self,int nSequeceNo):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetIssueType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":314
+ * def GetIssueType(self):
+ * return self.lpBizMessage.GetIssueType()
+ * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ * def GetSequeceNo(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSequeceNo) {
+ int __pyx_v_nSequeceNo;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSequeceNo (wrapper)", 0);
+ assert(__pyx_arg_nSequeceNo); {
+ __pyx_v_nSequeceNo = __Pyx_PyInt_As_int(__pyx_arg_nSequeceNo); if (unlikely((__pyx_v_nSequeceNo == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 314, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((int)__pyx_v_nSequeceNo));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_52SetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, int __pyx_v_nSequeceNo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSequeceNo", 0);
+
+ /* "py_t2sdk.pyx":315
+ * return self.lpBizMessage.GetIssueType()
+ * def SetSequeceNo(self,int nSequeceNo):
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo) # <<<<<<<<<<<<<<
+ * def GetSequeceNo(self):
+ * return self.lpBizMessage.GetSequeceNo()
+ */
+ __pyx_v_self->lpBizMessage->SetSequeceNo(__pyx_v_nSequeceNo);
+
+ /* "py_t2sdk.pyx":314
+ * def GetIssueType(self):
+ * return self.lpBizMessage.GetIssueType()
+ * def SetSequeceNo(self,int nSequeceNo): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ * def GetSequeceNo(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":316
+ * def SetSequeceNo(self,int nSequeceNo):
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ * def GetSequeceNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSequeceNo()
+ * def SetKeyInfo(self,list lpKeyData,int iLen):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSequeceNo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_54GetSequeceNo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSequeceNo", 0);
+
+ /* "py_t2sdk.pyx":317
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ * def GetSequeceNo(self):
+ * return self.lpBizMessage.GetSequeceNo() # <<<<<<<<<<<<<<
+ * def SetKeyInfo(self,list lpKeyData,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpBizMessage->GetSequeceNo()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":316
+ * def SetSequeceNo(self,int nSequeceNo):
+ * self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ * def GetSequeceNo(self): # <<<<<<<<<<<<<<
+ * return self.lpBizMessage.GetSequeceNo()
+ * def SetKeyInfo(self,list lpKeyData,int iLen):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetSequeceNo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":318
+ * def GetSequeceNo(self):
+ * return self.lpBizMessage.GetSequeceNo()
+ * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpKeyData = 0;
+ int __pyx_v_iLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetKeyInfo (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpKeyData,&__pyx_n_s_iLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpKeyData)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, 1); __PYX_ERR(1, 318, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetKeyInfo") < 0)) __PYX_ERR(1, 318, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpKeyData = ((PyObject*)values[0]);
+ __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 318, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetKeyInfo", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 318, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpKeyData), (&PyList_Type), 1, "lpKeyData", 1))) __PYX_ERR(1, 318, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpKeyData, __pyx_v_iLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_56SetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpKeyData, int __pyx_v_iLen) {
+ char *__pyx_v_sBuff;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ char __pyx_t_3;
+ __Pyx_RefNannySetupContext("SetKeyInfo", 0);
+
+ /* "py_t2sdk.pyx":319
+ * return self.lpBizMessage.GetSequeceNo()
+ * def SetKeyInfo(self,list lpKeyData,int iLen):
+ * cdef char* sBuff = malloc(iLen) # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_v_sBuff = ((char *)malloc(__pyx_v_iLen));
+
+ /* "py_t2sdk.pyx":320
+ * def SetKeyInfo(self,list lpKeyData,int iLen):
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpKeyData[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":321
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * sBuff[iIndex] = lpKeyData[iIndex]
+ * iIndex+=1
+ */
+ while (1) {
+ __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_1) break;
+
+ /* "py_t2sdk.pyx":322
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpKeyData[iIndex] # <<<<<<<<<<<<<<
+ * iIndex+=1
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ */
+ if (unlikely(__pyx_v_lpKeyData == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 322, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpKeyData, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 322, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 322, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3;
+
+ /* "py_t2sdk.pyx":323
+ * while iIndex < iLen:
+ * sBuff[iIndex] = lpKeyData[iIndex]
+ * iIndex+=1 # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ * def GetKeyInfo(self):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":324
+ * sBuff[iIndex] = lpKeyData[iIndex]
+ * iIndex+=1
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen) # <<<<<<<<<<<<<<
+ * def GetKeyInfo(self):
+ * cdef int iLen = 0
+ */
+ __pyx_v_self->lpBizMessage->SetKeyInfo(__pyx_v_sBuff, __pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":318
+ * def GetSequeceNo(self):
+ * return self.lpBizMessage.GetSequeceNo()
+ * def SetKeyInfo(self,list lpKeyData,int iLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(iLen)
+ * cdef int iIndex = 0
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":325
+ * iIndex+=1
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ * def GetKeyInfo(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef int itemp = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetKeyInfo (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_58GetKeyInfo(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ int __pyx_v_iLen;
+ CYTHON_UNUSED int __pyx_v_itemp;
+ char *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("GetKeyInfo", 0);
+
+ /* "py_t2sdk.pyx":326
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ * def GetKeyInfo(self):
+ * cdef int iLen = 0 # <<<<<<<<<<<<<<
+ * cdef int itemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen)
+ */
+ __pyx_v_iLen = 0;
+
+ /* "py_t2sdk.pyx":327
+ * def GetKeyInfo(self):
+ * cdef int iLen = 0
+ * cdef int itemp = 0 # <<<<<<<<<<<<<<
+ * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen)
+ * lpBuff = []
+ */
+ __pyx_v_itemp = 0;
+
+ /* "py_t2sdk.pyx":328
+ * cdef int iLen = 0
+ * cdef int itemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen) # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef int iIndex = 0
+ */
+ __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetKeyInfo(__pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":329
+ * cdef int itemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen)
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":330
+ * cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen)
+ * lpBuff = []
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * lpBuff.append(sBuff[iIndex])
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":331
+ * lpBuff = []
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ */
+ while (1) {
+ __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_2) break;
+
+ /* "py_t2sdk.pyx":332
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * lpBuff.append(sBuff[iIndex]) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff,iLen
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":333
+ * while iIndex < iLen:
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff,iLen
+ * def SetAppData(self,str lpAppdata,int nAppLen):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":334
+ * lpBuff.append(sBuff[iIndex])
+ * iIndex +=1
+ * return lpBuff,iLen # <<<<<<<<<<<<<<
+ * def SetAppData(self,str lpAppdata,int nAppLen):
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 334, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 334, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_v_lpBuff);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":325
+ * iIndex+=1
+ * self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ * def GetKeyInfo(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef int itemp = 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetKeyInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":335
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<<
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpAppdata = 0;
+ int __pyx_v_nAppLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpAppdata,&__pyx_n_s_nAppLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpAppdata)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAppLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 335, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 335, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpAppdata = ((PyObject*)values[0]);
+ __pyx_v_nAppLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAppLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 335, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 335, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpAppdata), (&PyString_Type), 1, "lpAppdata", 1))) __PYX_ERR(1, 335, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpAppdata, __pyx_v_nAppLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_60SetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpAppdata, int __pyx_v_nAppLen) {
+ PyObject *__pyx_v_sAppData = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetAppData", 0);
+
+ /* "py_t2sdk.pyx":336
+ * return lpBuff,iLen
+ * def SetAppData(self,str lpAppdata,int nAppLen):
+ * sAppData = bytes(lpAppdata,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ * def GetAppData(self):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_lpAppdata);
+ __Pyx_GIVEREF(__pyx_v_lpAppdata);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpAppdata);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 336, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 336, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 336, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sAppData = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":337
+ * def SetAppData(self,str lpAppdata,int nAppLen):
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen) # <<<<<<<<<<<<<<
+ * def GetAppData(self):
+ * cdef int iLen = 0
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sAppData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 337, __pyx_L1_error)
+ __pyx_v_self->lpBizMessage->SetAppData(__pyx_t_4, __pyx_v_nAppLen);
+
+ /* "py_t2sdk.pyx":335
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetAppData(self,str lpAppdata,int nAppLen): # <<<<<<<<<<<<<<
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sAppData);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":338
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ * def GetAppData(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_62GetAppData(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ int __pyx_v_iLen;
+ char *__pyx_v_sAppData;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("GetAppData", 0);
+
+ /* "py_t2sdk.pyx":339
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ * def GetAppData(self):
+ * cdef int iLen = 0 # <<<<<<<<<<<<<<
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ * return sAppData,iLen
+ */
+ __pyx_v_iLen = 0;
+
+ /* "py_t2sdk.pyx":340
+ * def GetAppData(self):
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen) # <<<<<<<<<<<<<<
+ * return sAppData,iLen
+ * def ChangeReq2AnsMessage(self):
+ */
+ __pyx_v_sAppData = __pyx_v_self->lpBizMessage->GetAppData(__pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":341
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ * return sAppData,iLen # <<<<<<<<<<<<<<
+ * def ChangeReq2AnsMessage(self):
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 341, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 341, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 341, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":338
+ * sAppData = bytes(lpAppdata,encoding='utf-8')
+ * self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ * def GetAppData(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":342
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ * return sAppData,iLen
+ * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ * def GetBuff(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ChangeReq2AnsMessage (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_64ChangeReq2AnsMessage(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ChangeReq2AnsMessage", 0);
+
+ /* "py_t2sdk.pyx":343
+ * return sAppData,iLen
+ * def ChangeReq2AnsMessage(self):
+ * self.lpBizMessage.ChangeReq2AnsMessage() # <<<<<<<<<<<<<<
+ * def GetBuff(self):
+ * cdef int iLen = 0
+ */
+ (void)(__pyx_v_self->lpBizMessage->ChangeReq2AnsMessage());
+
+ /* "py_t2sdk.pyx":342
+ * cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ * return sAppData,iLen
+ * def ChangeReq2AnsMessage(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ * def GetBuff(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":344
+ * def ChangeReq2AnsMessage(self):
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ * def GetBuff(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef iTemp = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetBuff (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_66GetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ int __pyx_v_iLen;
+ PyObject *__pyx_v_iTemp = 0;
+ char *__pyx_v_sBuff;
+ PyObject *__pyx_v_lpBuff = NULL;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("GetBuff", 0);
+
+ /* "py_t2sdk.pyx":345
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ * def GetBuff(self):
+ * cdef int iLen = 0 # <<<<<<<<<<<<<<
+ * cdef iTemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen)
+ */
+ __pyx_v_iLen = 0;
+
+ /* "py_t2sdk.pyx":346
+ * def GetBuff(self):
+ * cdef int iLen = 0
+ * cdef iTemp = 0 # <<<<<<<<<<<<<<
+ * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen)
+ * lpBuff = []
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_iTemp = __pyx_int_0;
+
+ /* "py_t2sdk.pyx":347
+ * cdef int iLen = 0
+ * cdef iTemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen) # <<<<<<<<<<<<<<
+ * lpBuff = []
+ * cdef int iIndex = 0
+ */
+ __pyx_v_sBuff = __pyx_v_self->lpBizMessage->GetBuff(__pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":348
+ * cdef iTemp = 0
+ * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen)
+ * lpBuff = [] # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpBuff = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":349
+ * cdef char* sBuff = self.lpBizMessage.GetBuff(iLen)
+ * lpBuff = []
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":350
+ * lpBuff = []
+ * cdef int iIndex = 0
+ * while iIndex < iLen: # <<<<<<<<<<<<<<
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp)
+ */
+ while (1) {
+ __pyx_t_2 = ((__pyx_v_iIndex < __pyx_v_iLen) != 0);
+ if (!__pyx_t_2) break;
+
+ /* "py_t2sdk.pyx":351
+ * cdef int iIndex = 0
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex] # <<<<<<<<<<<<<<
+ * lpBuff.append(iTemp)
+ * iIndex +=1
+ */
+ __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_sBuff[__pyx_v_iIndex])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_iTemp, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":352
+ * while iIndex < iLen:
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp) # <<<<<<<<<<<<<<
+ * iIndex +=1
+ * return lpBuff,iLen
+ */
+ __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_lpBuff, __pyx_v_iTemp); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 352, __pyx_L1_error)
+
+ /* "py_t2sdk.pyx":353
+ * iTemp = sBuff[iIndex]
+ * lpBuff.append(iTemp)
+ * iIndex +=1 # <<<<<<<<<<<<<<
+ * return lpBuff,iLen
+ * def SetBuff(self,list lpBuff,int nBuffLen):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":354
+ * lpBuff.append(iTemp)
+ * iIndex +=1
+ * return lpBuff,iLen # <<<<<<<<<<<<<<
+ * def SetBuff(self,list lpBuff,int nBuffLen):
+ * cdef char* sBuff = malloc(nBuffLen)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_v_lpBuff);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lpBuff);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":344
+ * def ChangeReq2AnsMessage(self):
+ * self.lpBizMessage.ChangeReq2AnsMessage()
+ * def GetBuff(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef iTemp = 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.GetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_iTemp);
+ __Pyx_XDECREF(__pyx_v_lpBuff);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":355
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(nBuffLen)
+ * cdef int iIndex = 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpBuff = 0;
+ int __pyx_v_nBuffLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetBuff (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpBuff,&__pyx_n_s_nBuffLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpBuff)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nBuffLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, 1); __PYX_ERR(1, 355, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetBuff") < 0)) __PYX_ERR(1, 355, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpBuff = ((PyObject*)values[0]);
+ __pyx_v_nBuffLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nBuffLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 355, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetBuff", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 355, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpBuff), (&PyList_Type), 1, "lpBuff", 1))) __PYX_ERR(1, 355, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), __pyx_v_lpBuff, __pyx_v_nBuffLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_68SetBuff(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, PyObject *__pyx_v_lpBuff, int __pyx_v_nBuffLen) {
+ char *__pyx_v_sBuff;
+ int __pyx_v_iIndex;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ char __pyx_t_3;
+ __Pyx_RefNannySetupContext("SetBuff", 0);
+
+ /* "py_t2sdk.pyx":356
+ * return lpBuff,iLen
+ * def SetBuff(self,list lpBuff,int nBuffLen):
+ * cdef char* sBuff = malloc(nBuffLen) # <<<<<<<<<<<<<<
+ * cdef int iIndex = 0
+ * while iIndex < nBuffLen:
+ */
+ __pyx_v_sBuff = ((char *)malloc(__pyx_v_nBuffLen));
+
+ /* "py_t2sdk.pyx":357
+ * def SetBuff(self,list lpBuff,int nBuffLen):
+ * cdef char* sBuff = malloc(nBuffLen)
+ * cdef int iIndex = 0 # <<<<<<<<<<<<<<
+ * while iIndex < nBuffLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ */
+ __pyx_v_iIndex = 0;
+
+ /* "py_t2sdk.pyx":358
+ * cdef char* sBuff = malloc(nBuffLen)
+ * cdef int iIndex = 0
+ * while iIndex < nBuffLen: # <<<<<<<<<<<<<<
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ */
+ while (1) {
+ __pyx_t_1 = ((__pyx_v_iIndex < __pyx_v_nBuffLen) != 0);
+ if (!__pyx_t_1) break;
+
+ /* "py_t2sdk.pyx":359
+ * cdef int iIndex = 0
+ * while iIndex < nBuffLen:
+ * sBuff[iIndex] = lpBuff[iIndex] # <<<<<<<<<<<<<<
+ * iIndex+=1
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ */
+ if (unlikely(__pyx_v_lpBuff == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(1, 359, __pyx_L1_error)
+ }
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_lpBuff, __pyx_v_iIndex, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 359, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_As_char(__pyx_t_2); if (unlikely((__pyx_t_3 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 359, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ (__pyx_v_sBuff[__pyx_v_iIndex]) = __pyx_t_3;
+
+ /* "py_t2sdk.pyx":360
+ * while iIndex < nBuffLen:
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1 # <<<<<<<<<<<<<<
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ * def ReSet(self):
+ */
+ __pyx_v_iIndex = (__pyx_v_iIndex + 1);
+ }
+
+ /* "py_t2sdk.pyx":361
+ * sBuff[iIndex] = lpBuff[iIndex]
+ * iIndex+=1
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen) # <<<<<<<<<<<<<<
+ * def ReSet(self):
+ * self.lpBizMessage.ReSet()
+ */
+ (void)(__pyx_v_self->lpBizMessage->SetBuff(__pyx_v_sBuff, __pyx_v_nBuffLen));
+
+ /* "py_t2sdk.pyx":355
+ * iIndex +=1
+ * return lpBuff,iLen
+ * def SetBuff(self,list lpBuff,int nBuffLen): # <<<<<<<<<<<<<<
+ * cdef char* sBuff = malloc(nBuffLen)
+ * cdef int iIndex = 0
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.SetBuff", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":362
+ * iIndex+=1
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ * def ReSet(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.ReSet()
+ * def Release(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ReSet (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_70ReSet(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("ReSet", 0);
+
+ /* "py_t2sdk.pyx":363
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ * def ReSet(self):
+ * self.lpBizMessage.ReSet() # <<<<<<<<<<<<<<
+ * def Release(self):
+ * self.lpBizMessage.Release()
+ */
+ __pyx_v_self->lpBizMessage->ReSet();
+
+ /* "py_t2sdk.pyx":362
+ * iIndex+=1
+ * self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ * def ReSet(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.ReSet()
+ * def Release(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":364
+ * def ReSet(self):
+ * self.lpBizMessage.ReSet()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.Release()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_72Release(struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":365
+ * self.lpBizMessage.ReSet()
+ * def Release(self):
+ * self.lpBizMessage.Release() # <<<<<<<<<<<<<<
+ *
+ * cdef class pySubscribeParamInterface:
+ */
+ __pyx_v_self->lpBizMessage->Release();
+
+ /* "py_t2sdk.pyx":364
+ * def ReSet(self):
+ * self.lpBizMessage.ReSet()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * self.lpBizMessage.Release()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_74__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pyIBizMessage_76__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyIBizMessage.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":369
+ * cdef class pySubscribeParamInterface:
+ * cdef c_CSubscribeParamInterface* lpSubscribeParam
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_25pySubscribeParamInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ c_CSubscribeParamInterface *__pyx_t_1;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":370
+ * cdef c_CSubscribeParamInterface* lpSubscribeParam
+ * def __cinit__(self):
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface() # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * del self.lpSubscribeParam
+ */
+ try {
+ __pyx_t_1 = new c_CSubscribeParamInterface();
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 370, __pyx_L1_error)
+ }
+ __pyx_v_self->lpSubscribeParam = __pyx_t_1;
+
+ /* "py_t2sdk.pyx":369
+ * cdef class pySubscribeParamInterface:
+ * cdef c_CSubscribeParamInterface* lpSubscribeParam
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":371
+ * def __cinit__(self):
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpSubscribeParam
+ * def SetTopicName(self,str szName):
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":372
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ * def __dealloc__(self):
+ * del self.lpSubscribeParam # <<<<<<<<<<<<<<
+ * def SetTopicName(self,str szName):
+ * sName = bytes(szName,encoding='utf-8')
+ */
+ delete __pyx_v_self->lpSubscribeParam;
+
+ /* "py_t2sdk.pyx":371
+ * def __cinit__(self):
+ * self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * del self.lpSubscribeParam
+ * def SetTopicName(self,str szName):
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":373
+ * def __dealloc__(self):
+ * del self.lpSubscribeParam
+ * def SetTopicName(self,str szName): # <<<<<<<<<<<<<<
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpSubscribeParam.SetTopicName(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName(PyObject *__pyx_v_self, PyObject *__pyx_v_szName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetTopicName (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_szName), (&PyString_Type), 1, "szName", 1))) __PYX_ERR(1, 373, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_szName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_4SetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_szName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetTopicName", 0);
+
+ /* "py_t2sdk.pyx":374
+ * del self.lpSubscribeParam
+ * def SetTopicName(self,str szName):
+ * sName = bytes(szName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetTopicName(sName)
+ * def SetAppData(self,str lpData,int iLen):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 374, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_szName);
+ __Pyx_GIVEREF(__pyx_v_szName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_szName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 374, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 374, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 374, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":375
+ * def SetTopicName(self,str szName):
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpSubscribeParam.SetTopicName(sName) # <<<<<<<<<<<<<<
+ * def SetAppData(self,str lpData,int iLen):
+ * sData = bytes(lpData,encoding='utf-8')
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 375, __pyx_L1_error)
+ __pyx_v_self->lpSubscribeParam->SetTopicName(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":373
+ * def __dealloc__(self):
+ * del self.lpSubscribeParam
+ * def SetTopicName(self,str szName): # <<<<<<<<<<<<<<
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpSubscribeParam.SetTopicName(sName)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":376
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpSubscribeParam.SetTopicName(sName)
+ * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<<
+ * sData = bytes(lpData,encoding='utf-8')
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpData = 0;
+ int __pyx_v_iLen;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetAppData (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpData,&__pyx_n_s_iLen,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpData)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iLen)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, 1); __PYX_ERR(1, 376, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetAppData") < 0)) __PYX_ERR(1, 376, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpData = ((PyObject*)values[0]);
+ __pyx_v_iLen = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_iLen == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 376, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetAppData", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 376, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpData), (&PyString_Type), 1, "lpData", 1))) __PYX_ERR(1, 376, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_lpData, __pyx_v_iLen);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_6SetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_lpData, int __pyx_v_iLen) {
+ PyObject *__pyx_v_sData = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetAppData", 0);
+
+ /* "py_t2sdk.pyx":377
+ * self.lpSubscribeParam.SetTopicName(sName)
+ * def SetAppData(self,str lpData,int iLen):
+ * sData = bytes(lpData,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ * def SetFilter(self,str filterName,str filterValue):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_lpData);
+ __Pyx_GIVEREF(__pyx_v_lpData);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpData);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 377, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sData = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":378
+ * def SetAppData(self,str lpData,int iLen):
+ * sData = bytes(lpData,encoding='utf-8')
+ * self.lpSubscribeParam.SetAppData(sData,iLen) # <<<<<<<<<<<<<<
+ * def SetFilter(self,str filterName,str filterValue):
+ * sName = bytes(filterName,encoding='utf-8')
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sData); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 378, __pyx_L1_error)
+ __pyx_v_self->lpSubscribeParam->SetAppData(__pyx_t_4, __pyx_v_iLen);
+
+ /* "py_t2sdk.pyx":376
+ * sName = bytes(szName,encoding='utf-8')
+ * self.lpSubscribeParam.SetTopicName(sName)
+ * def SetAppData(self,str lpData,int iLen): # <<<<<<<<<<<<<<
+ * sData = bytes(lpData,encoding='utf-8')
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sData);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":379
+ * sData = bytes(lpData,encoding='utf-8')
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<<
+ * sName = bytes(filterName,encoding='utf-8')
+ * sValue = bytes(filterValue,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_filterName = 0;
+ PyObject *__pyx_v_filterValue = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetFilter (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filterName,&__pyx_n_s_filterValue,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterName)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filterValue)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, 1); __PYX_ERR(1, 379, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SetFilter") < 0)) __PYX_ERR(1, 379, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_filterName = ((PyObject*)values[0]);
+ __pyx_v_filterValue = ((PyObject*)values[1]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SetFilter", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 379, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterName), (&PyString_Type), 1, "filterName", 1))) __PYX_ERR(1, 379, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filterValue), (&PyString_Type), 1, "filterValue", 1))) __PYX_ERR(1, 379, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), __pyx_v_filterName, __pyx_v_filterValue);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_8SetFilter(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filterName, PyObject *__pyx_v_filterValue) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_v_sValue = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ __Pyx_RefNannySetupContext("SetFilter", 0);
+
+ /* "py_t2sdk.pyx":380
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ * def SetFilter(self,str filterName,str filterValue):
+ * sName = bytes(filterName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sValue = bytes(filterValue,encoding='utf-8')
+ * self.lpSubscribeParam.SetFilter(sName,sValue)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 380, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_filterName);
+ __Pyx_GIVEREF(__pyx_v_filterName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filterName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 380, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 380, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 380, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":381
+ * def SetFilter(self,str filterName,str filterValue):
+ * sName = bytes(filterName,encoding='utf-8')
+ * sValue = bytes(filterValue,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetFilter(sName,sValue)
+ * def SetReturnFiled(self,str filedName):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_filterValue);
+ __Pyx_GIVEREF(__pyx_v_filterValue);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_filterValue);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 381, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sValue = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":382
+ * sName = bytes(filterName,encoding='utf-8')
+ * sValue = bytes(filterValue,encoding='utf-8')
+ * self.lpSubscribeParam.SetFilter(sName,sValue) # <<<<<<<<<<<<<<
+ * def SetReturnFiled(self,str filedName):
+ * sName = bytes(filedName,encoding='utf-8')
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sValue); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 382, __pyx_L1_error)
+ __pyx_v_self->lpSubscribeParam->SetFilter(__pyx_t_4, __pyx_t_5);
+
+ /* "py_t2sdk.pyx":379
+ * sData = bytes(lpData,encoding='utf-8')
+ * self.lpSubscribeParam.SetAppData(sData,iLen)
+ * def SetFilter(self,str filterName,str filterValue): # <<<<<<<<<<<<<<
+ * sName = bytes(filterName,encoding='utf-8')
+ * sValue = bytes(filterValue,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFilter", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XDECREF(__pyx_v_sValue);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":383
+ * sValue = bytes(filterValue,encoding='utf-8')
+ * self.lpSubscribeParam.SetFilter(sName,sValue)
+ * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<<
+ * sName = bytes(filedName,encoding='utf-8')
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled(PyObject *__pyx_v_self, PyObject *__pyx_v_filedName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReturnFiled (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filedName), (&PyString_Type), 1, "filedName", 1))) __PYX_ERR(1, 383, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_filedName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_10SetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_filedName) {
+ PyObject *__pyx_v_sName = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SetReturnFiled", 0);
+
+ /* "py_t2sdk.pyx":384
+ * self.lpSubscribeParam.SetFilter(sName,sValue)
+ * def SetReturnFiled(self,str filedName):
+ * sName = bytes(filedName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ * def SetFromNow(self,int bFromNow):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_filedName);
+ __Pyx_GIVEREF(__pyx_v_filedName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_filedName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 384, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":385
+ * def SetReturnFiled(self,str filedName):
+ * sName = bytes(filedName,encoding='utf-8')
+ * self.lpSubscribeParam.SetReturnFiled(sName) # <<<<<<<<<<<<<<
+ * def SetFromNow(self,int bFromNow):
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error)
+ __pyx_v_self->lpSubscribeParam->SetReturnFiled(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":383
+ * sValue = bytes(filterValue,encoding='utf-8')
+ * self.lpSubscribeParam.SetFilter(sName,sValue)
+ * def SetReturnFiled(self,str filedName): # <<<<<<<<<<<<<<
+ * sName = bytes(filedName,encoding='utf-8')
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":386
+ * sName = bytes(filedName,encoding='utf-8')
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ * def SetReplace(self,int bReplace):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow(PyObject *__pyx_v_self, PyObject *__pyx_arg_bFromNow) {
+ int __pyx_v_bFromNow;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetFromNow (wrapper)", 0);
+ assert(__pyx_arg_bFromNow); {
+ __pyx_v_bFromNow = __Pyx_PyInt_As_int(__pyx_arg_bFromNow); if (unlikely((__pyx_v_bFromNow == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 386, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bFromNow));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_12SetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bFromNow) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetFromNow", 0);
+
+ /* "py_t2sdk.pyx":387
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ * def SetFromNow(self,int bFromNow):
+ * self.lpSubscribeParam.SetFromNow(bFromNow) # <<<<<<<<<<<<<<
+ * def SetReplace(self,int bReplace):
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ */
+ __pyx_v_self->lpSubscribeParam->SetFromNow(__pyx_v_bFromNow);
+
+ /* "py_t2sdk.pyx":386
+ * sName = bytes(filedName,encoding='utf-8')
+ * self.lpSubscribeParam.SetReturnFiled(sName)
+ * def SetFromNow(self,int bFromNow): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ * def SetReplace(self,int bReplace):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":388
+ * def SetFromNow(self,int bFromNow):
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ * def SetSendInterval(self,int nSendInterval):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace(PyObject *__pyx_v_self, PyObject *__pyx_arg_bReplace) {
+ int __pyx_v_bReplace;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReplace (wrapper)", 0);
+ assert(__pyx_arg_bReplace); {
+ __pyx_v_bReplace = __Pyx_PyInt_As_int(__pyx_arg_bReplace); if (unlikely((__pyx_v_bReplace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 388, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_bReplace));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_14SetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_bReplace) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetReplace", 0);
+
+ /* "py_t2sdk.pyx":389
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ * def SetReplace(self,int bReplace):
+ * self.lpSubscribeParam.SetReplace(bReplace) # <<<<<<<<<<<<<<
+ * def SetSendInterval(self,int nSendInterval):
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ */
+ __pyx_v_self->lpSubscribeParam->SetReplace(__pyx_v_bReplace);
+
+ /* "py_t2sdk.pyx":388
+ * def SetFromNow(self,int bFromNow):
+ * self.lpSubscribeParam.SetFromNow(bFromNow)
+ * def SetReplace(self,int bReplace): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ * def SetSendInterval(self,int nSendInterval):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":390
+ * def SetReplace(self,int bReplace):
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ * def GetTopicName(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval(PyObject *__pyx_v_self, PyObject *__pyx_arg_nSendInterval) {
+ int __pyx_v_nSendInterval;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSendInterval (wrapper)", 0);
+ assert(__pyx_arg_nSendInterval); {
+ __pyx_v_nSendInterval = __Pyx_PyInt_As_int(__pyx_arg_nSendInterval); if (unlikely((__pyx_v_nSendInterval == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 390, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.SetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_nSendInterval));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_16SetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_nSendInterval) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SetSendInterval", 0);
+
+ /* "py_t2sdk.pyx":391
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ * def SetSendInterval(self,int nSendInterval):
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval) # <<<<<<<<<<<<<<
+ * def GetTopicName(self):
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ */
+ __pyx_v_self->lpSubscribeParam->SetSendInterval(__pyx_v_nSendInterval);
+
+ /* "py_t2sdk.pyx":390
+ * def SetReplace(self,int bReplace):
+ * self.lpSubscribeParam.SetReplace(bReplace)
+ * def SetSendInterval(self,int nSendInterval): # <<<<<<<<<<<<<<
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ * def GetTopicName(self):
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":392
+ * def SetSendInterval(self,int nSendInterval):
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ * def GetTopicName(self): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ * return sName
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetTopicName (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_18GetTopicName(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ char *__pyx_v_sName;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetTopicName", 0);
+
+ /* "py_t2sdk.pyx":393
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ * def GetTopicName(self):
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName() # <<<<<<<<<<<<<<
+ * return sName
+ * def GetAppData(self):
+ */
+ __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetTopicName();
+
+ /* "py_t2sdk.pyx":394
+ * def GetTopicName(self):
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ * return sName # <<<<<<<<<<<<<<
+ * def GetAppData(self):
+ * cdef int iLen = 0
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":392
+ * def SetSendInterval(self,int nSendInterval):
+ * self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ * def GetTopicName(self): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ * return sName
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetTopicName", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":395
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ * return sName
+ * def GetAppData(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetAppData (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_20GetAppData(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ int __pyx_v_iLen;
+ char *__pyx_v_sAppData;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("GetAppData", 0);
+
+ /* "py_t2sdk.pyx":396
+ * return sName
+ * def GetAppData(self):
+ * cdef int iLen = 0 # <<<<<<<<<<<<<<
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ * return sAppData,iLen
+ */
+ __pyx_v_iLen = 0;
+
+ /* "py_t2sdk.pyx":397
+ * def GetAppData(self):
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen) # <<<<<<<<<<<<<<
+ * return sAppData,iLen
+ * def GetFilterNameByIndex(self,int index):
+ */
+ __pyx_v_sAppData = __pyx_v_self->lpSubscribeParam->GetAppData((&__pyx_v_iLen));
+
+ /* "py_t2sdk.pyx":398
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ * return sAppData,iLen # <<<<<<<<<<<<<<
+ * def GetFilterNameByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAppData); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iLen); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":395
+ * cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ * return sName
+ * def GetAppData(self): # <<<<<<<<<<<<<<
+ * cdef int iLen = 0
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetAppData", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":399
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ * return sAppData,iLen
+ * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ * return sName
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
+ int __pyx_v_index;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFilterNameByIndex (wrapper)", 0);
+ assert(__pyx_arg_index); {
+ __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 399, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_22GetFilterNameByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) {
+ char *__pyx_v_sName;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetFilterNameByIndex", 0);
+
+ /* "py_t2sdk.pyx":400
+ * return sAppData,iLen
+ * def GetFilterNameByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index) # <<<<<<<<<<<<<<
+ * return sName
+ * def GetFilterValueByIndex(self,int index):
+ */
+ __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterNameByIndex(__pyx_v_index);
+
+ /* "py_t2sdk.pyx":401
+ * def GetFilterNameByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ * return sName # <<<<<<<<<<<<<<
+ * def GetFilterValueByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":399
+ * cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ * return sAppData,iLen
+ * def GetFilterNameByIndex(self,int index): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ * return sName
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterNameByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":402
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ * return sName
+ * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ * return sName
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
+ int __pyx_v_index;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFilterValueByIndex (wrapper)", 0);
+ assert(__pyx_arg_index); {
+ __pyx_v_index = __Pyx_PyInt_As_int(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((int)__pyx_v_index));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_24GetFilterValueByIndex(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, int __pyx_v_index) {
+ char *__pyx_v_sName;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetFilterValueByIndex", 0);
+
+ /* "py_t2sdk.pyx":403
+ * return sName
+ * def GetFilterValueByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index) # <<<<<<<<<<<<<<
+ * return sName
+ * def GetFilterValue(self,str fileName):
+ */
+ __pyx_v_sName = __pyx_v_self->lpSubscribeParam->GetFilterValueByIndex(__pyx_v_index);
+
+ /* "py_t2sdk.pyx":404
+ * def GetFilterValueByIndex(self,int index):
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ * return sName # <<<<<<<<<<<<<<
+ * def GetFilterValue(self,str fileName):
+ * sName = bytes(fileName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sName); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 404, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":402
+ * cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ * return sName
+ * def GetFilterValueByIndex(self,int index): # <<<<<<<<<<<<<<
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ * return sName
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValueByIndex", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":405
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ * return sName
+ * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<<
+ * sName = bytes(fileName,encoding='utf-8')
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue(PyObject *__pyx_v_self, PyObject *__pyx_v_fileName) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFilterValue (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fileName), (&PyString_Type), 1, "fileName", 1))) __PYX_ERR(1, 405, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject*)__pyx_v_fileName));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_26GetFilterValue(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, PyObject *__pyx_v_fileName) {
+ PyObject *__pyx_v_sName = NULL;
+ char *__pyx_v_sValus;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ __Pyx_RefNannySetupContext("GetFilterValue", 0);
+
+ /* "py_t2sdk.pyx":406
+ * return sName
+ * def GetFilterValue(self,str fileName):
+ * sName = bytes(fileName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ * return sValus
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_fileName);
+ __Pyx_GIVEREF(__pyx_v_fileName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_fileName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 406, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":407
+ * def GetFilterValue(self,str fileName):
+ * sName = bytes(fileName,encoding='utf-8')
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName) # <<<<<<<<<<<<<<
+ * return sValus
+ * def GetFilterCount(self):
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 407, __pyx_L1_error)
+ __pyx_v_sValus = __pyx_v_self->lpSubscribeParam->GetFilterValue(__pyx_t_4);
+
+ /* "py_t2sdk.pyx":408
+ * sName = bytes(fileName,encoding='utf-8')
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ * return sValus # <<<<<<<<<<<<<<
+ * def GetFilterCount(self):
+ * return self.lpSubscribeParam.GetFilterCount()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_sValus); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":405
+ * cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ * return sName
+ * def GetFilterValue(self,str fileName): # <<<<<<<<<<<<<<
+ * sName = bytes(fileName,encoding='utf-8')
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":409
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ * return sValus
+ * def GetFilterCount(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.GetFilterCount()
+ * def GetReturnFiled(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFilterCount (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_28GetFilterCount(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetFilterCount", 0);
+
+ /* "py_t2sdk.pyx":410
+ * return sValus
+ * def GetFilterCount(self):
+ * return self.lpSubscribeParam.GetFilterCount() # <<<<<<<<<<<<<<
+ * def GetReturnFiled(self):
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetFilterCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":409
+ * sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ * return sValus
+ * def GetFilterCount(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.GetFilterCount()
+ * def GetReturnFiled(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFilterCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":411
+ * def GetFilterCount(self):
+ * return self.lpSubscribeParam.GetFilterCount()
+ * def GetReturnFiled(self): # <<<<<<<<<<<<<<
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ * return sFields
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetReturnFiled (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_30GetReturnFiled(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ char *__pyx_v_sFields;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetReturnFiled", 0);
+
+ /* "py_t2sdk.pyx":412
+ * return self.lpSubscribeParam.GetFilterCount()
+ * def GetReturnFiled(self):
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled() # <<<<<<<<<<<<<<
+ * return sFields
+ * def GetFromNow(self):
+ */
+ __pyx_v_sFields = __pyx_v_self->lpSubscribeParam->GetReturnFiled();
+
+ /* "py_t2sdk.pyx":413
+ * def GetReturnFiled(self):
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ * return sFields # <<<<<<<<<<<<<<
+ * def GetFromNow(self):
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sFields); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":411
+ * def GetFilterCount(self):
+ * return self.lpSubscribeParam.GetFilterCount()
+ * def GetReturnFiled(self): # <<<<<<<<<<<<<<
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ * return sFields
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReturnFiled", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":414
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ * return sFields
+ * def GetFromNow(self): # <<<<<<<<<<<<<<
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ * return bFromNow
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetFromNow (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_32GetFromNow(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ int __pyx_v_bFromNow;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetFromNow", 0);
+
+ /* "py_t2sdk.pyx":415
+ * return sFields
+ * def GetFromNow(self):
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow() # <<<<<<<<<<<<<<
+ * return bFromNow
+ * def GetReplace(self):
+ */
+ __pyx_v_bFromNow = __pyx_v_self->lpSubscribeParam->GetFromNow();
+
+ /* "py_t2sdk.pyx":416
+ * def GetFromNow(self):
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ * return bFromNow # <<<<<<<<<<<<<<
+ * def GetReplace(self):
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bFromNow); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":414
+ * cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ * return sFields
+ * def GetFromNow(self): # <<<<<<<<<<<<<<
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ * return bFromNow
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetFromNow", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":417
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ * return bFromNow
+ * def GetReplace(self): # <<<<<<<<<<<<<<
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ * return bRep
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetReplace (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_34GetReplace(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ int __pyx_v_bRep;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetReplace", 0);
+
+ /* "py_t2sdk.pyx":418
+ * return bFromNow
+ * def GetReplace(self):
+ * cdef int bRep = self.lpSubscribeParam.GetReplace() # <<<<<<<<<<<<<<
+ * return bRep
+ * def GetSendInterval(self):
+ */
+ __pyx_v_bRep = __pyx_v_self->lpSubscribeParam->GetReplace();
+
+ /* "py_t2sdk.pyx":419
+ * def GetReplace(self):
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ * return bRep # <<<<<<<<<<<<<<
+ * def GetSendInterval(self):
+ * return self.lpSubscribeParam.GetSendInterval()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_bRep); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":417
+ * cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ * return bFromNow
+ * def GetReplace(self): # <<<<<<<<<<<<<<
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ * return bRep
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetReplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":420
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ * return bRep
+ * def GetSendInterval(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.GetSendInterval()
+ * def Release(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSendInterval (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_36GetSendInterval(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSendInterval", 0);
+
+ /* "py_t2sdk.pyx":421
+ * return bRep
+ * def GetSendInterval(self):
+ * return self.lpSubscribeParam.GetSendInterval() # <<<<<<<<<<<<<<
+ * def Release(self):
+ * return self.lpSubscribeParam.Release()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubscribeParam->GetSendInterval()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":420
+ * cdef int bRep = self.lpSubscribeParam.GetReplace()
+ * return bRep
+ * def GetSendInterval(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.GetSendInterval()
+ * def Release(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.GetSendInterval", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":422
+ * def GetSendInterval(self):
+ * return self.lpSubscribeParam.GetSendInterval()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.Release()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_38Release(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":423
+ * return self.lpSubscribeParam.GetSendInterval()
+ * def Release(self):
+ * return self.lpSubscribeParam.Release() # <<<<<<<<<<<<<<
+ *
+ * cdef class pySubCallBack:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubscribeParam->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":422
+ * def GetSendInterval(self):
+ * return self.lpSubscribeParam.GetSendInterval()
+ * def Release(self): # <<<<<<<<<<<<<<
+ * return self.lpSubscribeParam.Release()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.Release", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_25pySubscribeParamInterface_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeParamInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":427
+ * cdef class pySubCallBack:
+ * cdef c_SubCallBack* lpSubCallBack
+ * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<<
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpMould = 0;
+ PyObject *__pyx_v_lpClass = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 427, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 427, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpMould = ((PyObject*)values[0]);
+ __pyx_v_lpClass = ((PyObject*)values[1]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 427, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 427, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 427, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_13pySubCallBack___cinit__(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) {
+ PyObject *__pyx_v_sMould = NULL;
+ PyObject *__pyx_v_sClass = NULL;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ c_SubCallBack *__pyx_t_6;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":428
+ * cdef c_SubCallBack* lpSubCallBack
+ * def __cinit__(self,str lpMould,str lpClass):
+ * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_lpMould);
+ __Pyx_GIVEREF(__pyx_v_lpMould);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 428, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sMould = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":429
+ * def __cinit__(self,str lpMould,str lpClass):
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ * def initInstance(self):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_lpClass);
+ __Pyx_GIVEREF(__pyx_v_lpClass);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 429, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sClass = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":430
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass) # <<<<<<<<<<<<<<
+ * def initInstance(self):
+ * return self.lpSubCallBack.initInstance()
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L1_error)
+ try {
+ __pyx_t_6 = new c_SubCallBack(__pyx_t_4, __pyx_t_5);
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 430, __pyx_L1_error)
+ }
+ __pyx_v_self->lpSubCallBack = __pyx_t_6;
+
+ /* "py_t2sdk.pyx":427
+ * cdef class pySubCallBack:
+ * cdef c_SubCallBack* lpSubCallBack
+ * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<<
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sMould);
+ __Pyx_XDECREF(__pyx_v_sClass);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":431
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ * def initInstance(self): # <<<<<<<<<<<<<<
+ * return self.lpSubCallBack.initInstance()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("initInstance (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_2initInstance(struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("initInstance", 0);
+
+ /* "py_t2sdk.pyx":432
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ * def initInstance(self):
+ * return self.lpSubCallBack.initInstance() # <<<<<<<<<<<<<<
+ *
+ * cdef class pySubscribeInterface:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubCallBack->initInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":431
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ * def initInstance(self): # <<<<<<<<<<<<<<
+ * return self.lpSubCallBack.initInstance()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubCallBack.initInstance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubCallBack *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_13pySubCallBack_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubCallBack.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":436
+ * cdef class pySubscribeInterface:
+ * cdef c_CSubscribeInterface* lpSubcribe
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_20pySubscribeInterface___cinit__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":437
+ * cdef c_CSubscribeInterface* lpSubcribe
+ * def __cinit__(self):
+ * self.lpSubcribe = NULL # <<<<<<<<<<<<<<
+ * def __dealloc__(self):
+ * if self.lpSubcribe != NULL:
+ */
+ __pyx_v_self->lpSubcribe = NULL;
+
+ /* "py_t2sdk.pyx":436
+ * cdef class pySubscribeInterface:
+ * cdef c_CSubscribeInterface* lpSubcribe
+ * def __cinit__(self): # <<<<<<<<<<<<<<
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":438
+ * def __cinit__(self):
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * if self.lpSubcribe != NULL:
+ * del self.lpSubcribe
+ */
+
+/* Python wrapper */
+static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
+static void __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(PyObject *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
+ __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+static void __pyx_pf_8py_t2sdk_20pySubscribeInterface_2__dealloc__(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) {
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ __Pyx_RefNannySetupContext("__dealloc__", 0);
+
+ /* "py_t2sdk.pyx":439
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self):
+ * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<<
+ * del self.lpSubcribe
+ * self.lpSubcribe = NULL
+ */
+ __pyx_t_1 = ((__pyx_v_self->lpSubcribe != NULL) != 0);
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":440
+ * def __dealloc__(self):
+ * if self.lpSubcribe != NULL:
+ * del self.lpSubcribe # <<<<<<<<<<<<<<
+ * self.lpSubcribe = NULL
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None):
+ */
+ delete __pyx_v_self->lpSubcribe;
+
+ /* "py_t2sdk.pyx":441
+ * if self.lpSubcribe != NULL:
+ * del self.lpSubcribe
+ * self.lpSubcribe = NULL # <<<<<<<<<<<<<<
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None):
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ */
+ __pyx_v_self->lpSubcribe = NULL;
+
+ /* "py_t2sdk.pyx":439
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self):
+ * if self.lpSubcribe != NULL: # <<<<<<<<<<<<<<
+ * del self.lpSubcribe
+ * self.lpSubcribe = NULL
+ */
+ }
+
+ /* "py_t2sdk.pyx":438
+ * def __cinit__(self):
+ * self.lpSubcribe = NULL
+ * def __dealloc__(self): # <<<<<<<<<<<<<<
+ * if self.lpSubcribe != NULL:
+ * del self.lpSubcribe
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+}
+
+/* "py_t2sdk.pyx":442
+ * del self.lpSubcribe
+ * self.lpSubcribe = NULL
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<<
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ * cdef c_IF2Packer* lpBizPack = NULL
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam = 0;
+ int __pyx_v_uiTimeout;
+ struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack = 0;
+ struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SubscribeTopic (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpSubParam,&__pyx_n_s_uiTimeout,&__pyx_n_s_lpUnPack,&__pyx_n_s_lpPack,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[2] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)Py_None);
+ values[3] = (PyObject *)((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpSubParam)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, 1); __PYX_ERR(1, 442, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpUnPack);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpPack);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SubscribeTopic") < 0)) __PYX_ERR(1, 442, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_lpSubParam = ((struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *)values[0]);
+ __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 442, __pyx_L3_error)
+ __pyx_v_lpUnPack = ((struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *)values[2]);
+ __pyx_v_lpPack = ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)values[3]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SubscribeTopic", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 442, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpSubParam), __pyx_ptype_8py_t2sdk_pySubscribeParamInterface, 1, "lpSubParam", 0))) __PYX_ERR(1, 442, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpUnPack), __pyx_ptype_8py_t2sdk_pyIF2UnPacker, 1, "lpUnPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 442, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), __pyx_v_lpSubParam, __pyx_v_uiTimeout, __pyx_v_lpUnPack, __pyx_v_lpPack);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_4SubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface *__pyx_v_lpSubParam, int __pyx_v_uiTimeout, struct __pyx_obj_8py_t2sdk_pyIF2UnPacker *__pyx_v_lpUnPack, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) {
+ c_IF2UnPacker **__pyx_v_lppBizUnPack;
+ c_IF2Packer *__pyx_v_lpBizPack;
+ int __pyx_v_ret;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ c_IF2Packer *__pyx_t_4;
+ __Pyx_RefNannySetupContext("SubscribeTopic", 0);
+
+ /* "py_t2sdk.pyx":443
+ * self.lpSubcribe = NULL
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None):
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL # <<<<<<<<<<<<<<
+ * cdef c_IF2Packer* lpBizPack = NULL
+ * if lpUnPack != None and lpPack != None:
+ */
+ __pyx_v_lppBizUnPack = NULL;
+
+ /* "py_t2sdk.pyx":444
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None):
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ * cdef c_IF2Packer* lpBizPack = NULL # <<<<<<<<<<<<<<
+ * if lpUnPack != None and lpPack != None:
+ * lppBizUnPack = &(lpUnPack.lpUnpacker)
+ */
+ __pyx_v_lpBizPack = NULL;
+
+ /* "py_t2sdk.pyx":445
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ * cdef c_IF2Packer* lpBizPack = NULL
+ * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<<
+ * lppBizUnPack = &(lpUnPack.lpUnpacker)
+ * lpBizPack = lpPack.lpPacker
+ */
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpUnPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_lpPack), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 445, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(1, 445, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "py_t2sdk.pyx":446
+ * cdef c_IF2Packer* lpBizPack = NULL
+ * if lpUnPack != None and lpPack != None:
+ * lppBizUnPack = &(lpUnPack.lpUnpacker) # <<<<<<<<<<<<<<
+ * lpBizPack = lpPack.lpPacker
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ */
+ __pyx_v_lppBizUnPack = (&__pyx_v_lpUnPack->lpUnpacker);
+
+ /* "py_t2sdk.pyx":447
+ * if lpUnPack != None and lpPack != None:
+ * lppBizUnPack = &(lpUnPack.lpUnpacker)
+ * lpBizPack = lpPack.lpPacker # <<<<<<<<<<<<<<
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ * return ret
+ */
+ __pyx_t_4 = __pyx_v_lpPack->lpPacker;
+ __pyx_v_lpBizPack = __pyx_t_4;
+
+ /* "py_t2sdk.pyx":445
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ * cdef c_IF2Packer* lpBizPack = NULL
+ * if lpUnPack != None and lpPack != None: # <<<<<<<<<<<<<<
+ * lppBizUnPack = &(lpUnPack.lpUnpacker)
+ * lpBizPack = lpPack.lpPacker
+ */
+ }
+
+ /* "py_t2sdk.pyx":448
+ * lppBizUnPack = &(lpUnPack.lpUnpacker)
+ * lpBizPack = lpPack.lpPacker
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack) # <<<<<<<<<<<<<<
+ * return ret
+ * def CancelSubscribeTopic(self,int subscribeIndex):
+ */
+ __pyx_v_ret = __pyx_v_self->lpSubcribe->SubscribeTopic(__pyx_v_lpSubParam->lpSubscribeParam, __pyx_v_uiTimeout, __pyx_v_lppBizUnPack, __pyx_v_lpBizPack);
+
+ /* "py_t2sdk.pyx":449
+ * lpBizPack = lpPack.lpPacker
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ * return ret # <<<<<<<<<<<<<<
+ * def CancelSubscribeTopic(self,int subscribeIndex):
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":442
+ * del self.lpSubcribe
+ * self.lpSubcribe = NULL
+ * def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None): # <<<<<<<<<<<<<<
+ * cdef c_IF2UnPacker** lppBizUnPack = NULL
+ * cdef c_IF2Packer* lpBizPack = NULL
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.SubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":450
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ * return ret
+ * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_arg_subscribeIndex) {
+ int __pyx_v_subscribeIndex;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("CancelSubscribeTopic (wrapper)", 0);
+ assert(__pyx_arg_subscribeIndex); {
+ __pyx_v_subscribeIndex = __Pyx_PyInt_As_int(__pyx_arg_subscribeIndex); if (unlikely((__pyx_v_subscribeIndex == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 450, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((int)__pyx_v_subscribeIndex));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_6CancelSubscribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, int __pyx_v_subscribeIndex) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("CancelSubscribeTopic", 0);
+
+ /* "py_t2sdk.pyx":451
+ * return ret
+ * def CancelSubscribeTopic(self,int subscribeIndex):
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex) # <<<<<<<<<<<<<<
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpSubcribe->CancelSubscribeTopic(__pyx_v_subscribeIndex)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":450
+ * cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ * return ret
+ * def CancelSubscribeTopic(self,int subscribeIndex): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.CancelSubscribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":452
+ * def CancelSubscribeTopic(self,int subscribeIndex):
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ * def Release(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic(PyObject *__pyx_v_self, PyObject *__pyx_v_lpPack) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSubcribeTopic (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpPack), __pyx_ptype_8py_t2sdk_pyIF2Packer, 1, "lpPack", 0))) __PYX_ERR(1, 452, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyIF2Packer *)__pyx_v_lpPack));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_8GetSubcribeTopic(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIF2Packer *__pyx_v_lpPack) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSubcribeTopic", 0);
+
+ /* "py_t2sdk.pyx":453
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker) # <<<<<<<<<<<<<<
+ * def Release(self):
+ * return self.lpSubcribe.Release()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->GetSubcribeTopic(__pyx_v_lpPack->lpPacker)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":452
+ * def CancelSubscribeTopic(self,int subscribeIndex):
+ * return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ * def Release(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.GetSubcribeTopic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":454
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ * def Release(self): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.Release()
+ * cdef class pyCallbackInterface:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Release (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_10Release(struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("Release", 0);
+
+ /* "py_t2sdk.pyx":455
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ * def Release(self):
+ * return self.lpSubcribe.Release() # <<<<<<<<<<<<<<
+ * cdef class pyCallbackInterface:
+ * cdef c_CCallbackInterface* lpCallBack
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_void_to_None(__pyx_v_self->lpSubcribe->Release()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 455, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":454
+ * def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ * return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ * def Release(self): # <<<<<<<<<<<<<<
+ * return self.lpSubcribe.Release()
+ * cdef class pyCallbackInterface:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.Release", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_20pySubscribeInterface_14__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pySubscribeInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":458
+ * cdef class pyCallbackInterface:
+ * cdef c_CCallbackInterface* lpCallBack
+ * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<<
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lpMould = 0;
+ PyObject *__pyx_v_lpClass = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMould,&__pyx_n_s_lpClass,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMould)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpClass)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(1, 458, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 458, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_lpMould = ((PyObject*)values[0]);
+ __pyx_v_lpClass = ((PyObject*)values[1]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 458, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMould), (&PyString_Type), 1, "lpMould", 1))) __PYX_ERR(1, 458, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpClass), (&PyString_Type), 1, "lpClass", 1))) __PYX_ERR(1, 458, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), __pyx_v_lpMould, __pyx_v_lpClass);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_19pyCallbackInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, PyObject *__pyx_v_lpMould, PyObject *__pyx_v_lpClass) {
+ PyObject *__pyx_v_sMould = NULL;
+ PyObject *__pyx_v_sClass = NULL;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ char *__pyx_t_5;
+ c_CCallbackInterface *__pyx_t_6;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":459
+ * cdef c_CCallbackInterface* lpCallBack
+ * def __cinit__(self,str lpMould,str lpClass):
+ * sMould = bytes(lpMould,encoding='utf-8') # <<<<<<<<<<<<<<
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_lpMould);
+ __Pyx_GIVEREF(__pyx_v_lpMould);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_lpMould);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 459, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sMould = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":460
+ * def __cinit__(self,str lpMould,str lpClass):
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8') # <<<<<<<<<<<<<<
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ * def InitInstance(self):
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_lpClass);
+ __Pyx_GIVEREF(__pyx_v_lpClass);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lpClass);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 460, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sClass = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":461
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass) # <<<<<<<<<<<<<<
+ * def InitInstance(self):
+ * return self.lpCallBack.InitInstance()
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sMould); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_sClass); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(1, 461, __pyx_L1_error)
+ try {
+ __pyx_t_6 = new c_CCallbackInterface(__pyx_t_4, __pyx_t_5);
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 461, __pyx_L1_error)
+ }
+ __pyx_v_self->lpCallBack = __pyx_t_6;
+
+ /* "py_t2sdk.pyx":458
+ * cdef class pyCallbackInterface:
+ * cdef c_CCallbackInterface* lpCallBack
+ * def __cinit__(self,str lpMould,str lpClass): # <<<<<<<<<<<<<<
+ * sMould = bytes(lpMould,encoding='utf-8')
+ * sClass = bytes(lpClass,encoding='utf-8')
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sMould);
+ __Pyx_XDECREF(__pyx_v_sClass);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":462
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ * def InitInstance(self): # <<<<<<<<<<<<<<
+ * return self.lpCallBack.InitInstance()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("InitInstance (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_2InitInstance(struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("InitInstance", 0);
+
+ /* "py_t2sdk.pyx":463
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ * def InitInstance(self):
+ * return self.lpCallBack.InitInstance() # <<<<<<<<<<<<<<
+ *
+ * cdef class pyConnectionInterface:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpCallBack->InitInstance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":462
+ * sClass = bytes(lpClass,encoding='utf-8')
+ * self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ * def InitInstance(self): # <<<<<<<<<<<<<<
+ * return self.lpCallBack.InitInstance()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.InitInstance", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_19pyCallbackInterface_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyCallbackInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":467
+ * cdef class pyConnectionInterface:
+ * cdef c_CConnectionInterface* lpConnect
+ * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<<
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ * def Connect(self,int uiTimeout):
+ */
+
+/* Python wrapper */
+static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static int __pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig = 0;
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pConfig,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pConfig)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 467, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_pConfig = ((struct __pyx_obj_8py_t2sdk_pyCConfigInterface *)values[0]);
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 467, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return -1;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pConfig), __pyx_ptype_8py_t2sdk_pyCConfigInterface, 1, "pConfig", 0))) __PYX_ERR(1, 467, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_pConfig);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static int __pyx_pf_8py_t2sdk_21pyConnectionInterface___cinit__(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCConfigInterface *__pyx_v_pConfig) {
+ int __pyx_r;
+ __Pyx_RefNannyDeclarations
+ c_CConnectionInterface *__pyx_t_1;
+ __Pyx_RefNannySetupContext("__cinit__", 0);
+
+ /* "py_t2sdk.pyx":468
+ * cdef c_CConnectionInterface* lpConnect
+ * def __cinit__(self,pyCConfigInterface pConfig):
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig) # <<<<<<<<<<<<<<
+ * def Connect(self,int uiTimeout):
+ * return self.lpConnect.Connect(uiTimeout)
+ */
+ try {
+ __pyx_t_1 = new c_CConnectionInterface(__pyx_v_pConfig->lpConfig);
+ } catch(...) {
+ __Pyx_CppExn2PyErr();
+ __PYX_ERR(1, 468, __pyx_L1_error)
+ }
+ __pyx_v_self->lpConnect = __pyx_t_1;
+
+ /* "py_t2sdk.pyx":467
+ * cdef class pyConnectionInterface:
+ * cdef c_CConnectionInterface* lpConnect
+ * def __cinit__(self,pyCConfigInterface pConfig): # <<<<<<<<<<<<<<
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ * def Connect(self,int uiTimeout):
+ */
+
+ /* function exit code */
+ __pyx_r = 0;
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = -1;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":469
+ * def __cinit__(self,pyCConfigInterface pConfig):
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Connect(uiTimeout)
+ * def Close(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect(PyObject *__pyx_v_self, PyObject *__pyx_arg_uiTimeout) {
+ int __pyx_v_uiTimeout;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Connect (wrapper)", 0);
+ assert(__pyx_arg_uiTimeout); {
+ __pyx_v_uiTimeout = __Pyx_PyInt_As_int(__pyx_arg_uiTimeout); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 469, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_uiTimeout));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_2Connect(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_uiTimeout) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("Connect", 0);
+
+ /* "py_t2sdk.pyx":470
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ * def Connect(self,int uiTimeout):
+ * return self.lpConnect.Connect(uiTimeout) # <<<<<<<<<<<<<<
+ * def Close(self):
+ * return self.lpConnect.Close()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Connect(__pyx_v_uiTimeout)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":469
+ * def __cinit__(self,pyCConfigInterface pConfig):
+ * self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ * def Connect(self,int uiTimeout): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Connect(uiTimeout)
+ * def Close(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Connect", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":471
+ * def Connect(self,int uiTimeout):
+ * return self.lpConnect.Connect(uiTimeout)
+ * def Close(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Close()
+ * def GetServerAddress(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Close (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_4Close(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("Close", 0);
+
+ /* "py_t2sdk.pyx":472
+ * return self.lpConnect.Connect(uiTimeout)
+ * def Close(self):
+ * return self.lpConnect.Close() # <<<<<<<<<<<<<<
+ * def GetServerAddress(self):
+ * cdef int iPort = 0
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Close()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 472, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":471
+ * def Connect(self,int uiTimeout):
+ * return self.lpConnect.Connect(uiTimeout)
+ * def Close(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Close()
+ * def GetServerAddress(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Close", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":473
+ * def Close(self):
+ * return self.lpConnect.Close()
+ * def GetServerAddress(self): # <<<<<<<<<<<<<<
+ * cdef int iPort = 0
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetServerAddress (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_6GetServerAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ int __pyx_v_iPort;
+ char *__pyx_v_sAddress;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("GetServerAddress", 0);
+
+ /* "py_t2sdk.pyx":474
+ * return self.lpConnect.Close()
+ * def GetServerAddress(self):
+ * cdef int iPort = 0 # <<<<<<<<<<<<<<
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ * return sAddress,iPort
+ */
+ __pyx_v_iPort = 0;
+
+ /* "py_t2sdk.pyx":475
+ * def GetServerAddress(self):
+ * cdef int iPort = 0
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort) # <<<<<<<<<<<<<<
+ * return sAddress,iPort
+ * def GetStatus(self):
+ */
+ __pyx_v_sAddress = __pyx_v_self->lpConnect->GetServerAddress((&__pyx_v_iPort));
+
+ /* "py_t2sdk.pyx":476
+ * cdef int iPort = 0
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ * return sAddress,iPort # <<<<<<<<<<<<<<
+ * def GetStatus(self):
+ * return self.lpConnect.GetStatus()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_iPort); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 476, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":473
+ * def Close(self):
+ * return self.lpConnect.Close()
+ * def GetServerAddress(self): # <<<<<<<<<<<<<<
+ * cdef int iPort = 0
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":477
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ * return sAddress,iPort
+ * def GetStatus(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetStatus()
+ * def GetServerLoad(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetStatus (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_8GetStatus(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetStatus", 0);
+
+ /* "py_t2sdk.pyx":478
+ * return sAddress,iPort
+ * def GetStatus(self):
+ * return self.lpConnect.GetStatus() # <<<<<<<<<<<<<<
+ * def GetServerLoad(self):
+ * return self.lpConnect.GetServerLoad()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetStatus()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 478, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":477
+ * cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ * return sAddress,iPort
+ * def GetStatus(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetStatus()
+ * def GetServerLoad(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetStatus", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":479
+ * def GetStatus(self):
+ * return self.lpConnect.GetStatus()
+ * def GetServerLoad(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetServerLoad()
+ * def GetErrorMsg(self,int nErrorCode):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetServerLoad (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_10GetServerLoad(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetServerLoad", 0);
+
+ /* "py_t2sdk.pyx":480
+ * return self.lpConnect.GetStatus()
+ * def GetServerLoad(self):
+ * return self.lpConnect.GetServerLoad() # <<<<<<<<<<<<<<
+ * def GetErrorMsg(self,int nErrorCode):
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetServerLoad()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":479
+ * def GetStatus(self):
+ * return self.lpConnect.GetStatus()
+ * def GetServerLoad(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetServerLoad()
+ * def GetErrorMsg(self,int nErrorCode):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetServerLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":481
+ * def GetServerLoad(self):
+ * return self.lpConnect.GetServerLoad()
+ * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<<
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ * return sErrMsg.decode('GBK')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg(PyObject *__pyx_v_self, PyObject *__pyx_arg_nErrorCode) {
+ int __pyx_v_nErrorCode;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetErrorMsg (wrapper)", 0);
+ assert(__pyx_arg_nErrorCode); {
+ __pyx_v_nErrorCode = __Pyx_PyInt_As_int(__pyx_arg_nErrorCode); if (unlikely((__pyx_v_nErrorCode == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 481, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((int)__pyx_v_nErrorCode));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_12GetErrorMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_nErrorCode) {
+ char *__pyx_v_sErrMsg;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetErrorMsg", 0);
+
+ /* "py_t2sdk.pyx":482
+ * return self.lpConnect.GetServerLoad()
+ * def GetErrorMsg(self,int nErrorCode):
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode) # <<<<<<<<<<<<<<
+ * return sErrMsg.decode('GBK')
+ * def GetConnectError(self):
+ */
+ __pyx_v_sErrMsg = __pyx_v_self->lpConnect->GetErrorMsg(__pyx_v_nErrorCode);
+
+ /* "py_t2sdk.pyx":483
+ * def GetErrorMsg(self,int nErrorCode):
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ * return sErrMsg.decode('GBK') # <<<<<<<<<<<<<<
+ * def GetConnectError(self):
+ * return self.lpConnect.GetConnectError()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_sErrMsg, 0, strlen(__pyx_v_sErrMsg), ((char const *)"GBK"), NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":481
+ * def GetServerLoad(self):
+ * return self.lpConnect.GetServerLoad()
+ * def GetErrorMsg(self,int nErrorCode): # <<<<<<<<<<<<<<
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ * return sErrMsg.decode('GBK')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetErrorMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":484
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ * return sErrMsg.decode('GBK')
+ * def GetConnectError(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetConnectError()
+ * def GetRealAddress(self):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetConnectError (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_14GetConnectError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetConnectError", 0);
+
+ /* "py_t2sdk.pyx":485
+ * return sErrMsg.decode('GBK')
+ * def GetConnectError(self):
+ * return self.lpConnect.GetConnectError() # <<<<<<<<<<<<<<
+ * def GetRealAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->GetConnectError()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":484
+ * cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ * return sErrMsg.decode('GBK')
+ * def GetConnectError(self): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetConnectError()
+ * def GetRealAddress(self):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetConnectError", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":486
+ * def GetConnectError(self):
+ * return self.lpConnect.GetConnectError()
+ * def GetRealAddress(self): # <<<<<<<<<<<<<<
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ * return sAddress
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetRealAddress (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_16GetRealAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ char *__pyx_v_sAddress;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetRealAddress", 0);
+
+ /* "py_t2sdk.pyx":487
+ * return self.lpConnect.GetConnectError()
+ * def GetRealAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetRealAddress() # <<<<<<<<<<<<<<
+ * return sAddress
+ * def GetSelfAddress(self):
+ */
+ __pyx_v_sAddress = __pyx_v_self->lpConnect->GetRealAddress();
+
+ /* "py_t2sdk.pyx":488
+ * def GetRealAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ * return sAddress # <<<<<<<<<<<<<<
+ * def GetSelfAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":486
+ * def GetConnectError(self):
+ * return self.lpConnect.GetConnectError()
+ * def GetRealAddress(self): # <<<<<<<<<<<<<<
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ * return sAddress
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetRealAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":489
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ * return sAddress
+ * def GetSelfAddress(self): # <<<<<<<<<<<<<<
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ * return sAddress
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSelfAddress (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_18GetSelfAddress(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ char *__pyx_v_sAddress;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSelfAddress", 0);
+
+ /* "py_t2sdk.pyx":490
+ * return sAddress
+ * def GetSelfAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress() # <<<<<<<<<<<<<<
+ * return sAddress
+ * def GetSelfMac(self):
+ */
+ __pyx_v_sAddress = __pyx_v_self->lpConnect->GetSelfAddress();
+
+ /* "py_t2sdk.pyx":491
+ * def GetSelfAddress(self):
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ * return sAddress # <<<<<<<<<<<<<<
+ * def GetSelfMac(self):
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sAddress); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":489
+ * cdef char* sAddress = self.lpConnect.GetRealAddress()
+ * return sAddress
+ * def GetSelfAddress(self): # <<<<<<<<<<<<<<
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ * return sAddress
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":492
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ * return sAddress
+ * def GetSelfMac(self): # <<<<<<<<<<<<<<
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ * return sMac
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetSelfMac (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_20GetSelfMac(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ char *__pyx_v_sMac;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetSelfMac", 0);
+
+ /* "py_t2sdk.pyx":493
+ * return sAddress
+ * def GetSelfMac(self):
+ * cdef char* sMac = self.lpConnect.GetSelfMac() # <<<<<<<<<<<<<<
+ * return sMac
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut):
+ */
+ __pyx_v_sMac = __pyx_v_self->lpConnect->GetSelfMac();
+
+ /* "py_t2sdk.pyx":494
+ * def GetSelfMac(self):
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ * return sMac # <<<<<<<<<<<<<<
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut):
+ * sName = bytes(SubScribeName,encoding='utf-8')
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_sMac); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":492
+ * cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ * return sAddress
+ * def GetSelfMac(self): # <<<<<<<<<<<<<<
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ * return sMac
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetSelfMac", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":495
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ * return sMac
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<<
+ * sName = bytes(SubScribeName,encoding='utf-8')
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback = 0;
+ PyObject *__pyx_v_SubScribeName = 0;
+ int __pyx_v_iTimeOut;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("NewSubscriber (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lppCallback,&__pyx_n_s_SubScribeName,&__pyx_n_s_iTimeOut,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lppCallback)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_SubScribeName)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 1); __PYX_ERR(1, 495, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iTimeOut)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, 2); __PYX_ERR(1, 495, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "NewSubscriber") < 0)) __PYX_ERR(1, 495, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_lppCallback = ((struct __pyx_obj_8py_t2sdk_pySubCallBack *)values[0]);
+ __pyx_v_SubScribeName = ((PyObject*)values[1]);
+ __pyx_v_iTimeOut = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_iTimeOut == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 495, __pyx_L3_error)
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("NewSubscriber", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 495, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pySubCallBack, 1, "lppCallback", 0))) __PYX_ERR(1, 495, __pyx_L1_error)
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_SubScribeName), (&PyString_Type), 1, "SubScribeName", 1))) __PYX_ERR(1, 495, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lppCallback, __pyx_v_SubScribeName, __pyx_v_iTimeOut);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_22NewSubscriber(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pySubCallBack *__pyx_v_lppCallback, PyObject *__pyx_v_SubScribeName, int __pyx_v_iTimeOut) {
+ PyObject *__pyx_v_sName = NULL;
+ c_CSubscribeInterface *__pyx_v_lpSub;
+ struct __pyx_obj_8py_t2sdk_pySubscribeInterface *__pyx_v_pSub = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ char *__pyx_t_4;
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("NewSubscriber", 0);
+
+ /* "py_t2sdk.pyx":496
+ * return sMac
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut):
+ * sName = bytes(SubScribeName,encoding='utf-8') # <<<<<<<<<<<<<<
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ * pSub = pySubscribeInterface()
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 496, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_SubScribeName);
+ __Pyx_GIVEREF(__pyx_v_SubScribeName);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_SubScribeName);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 496, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_kp_s_utf_8) < 0) __PYX_ERR(1, 496, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 496, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_sName = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":497
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut):
+ * sName = bytes(SubScribeName,encoding='utf-8')
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut) # <<<<<<<<<<<<<<
+ * pSub = pySubscribeInterface()
+ * pSub.lpSubcribe = lpSub
+ */
+ __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_sName); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(1, 497, __pyx_L1_error)
+ __pyx_v_lpSub = __pyx_v_self->lpConnect->NewSubscriber(__pyx_v_lppCallback->lpSubCallBack, __pyx_t_4, __pyx_v_iTimeOut, NULL);
+
+ /* "py_t2sdk.pyx":498
+ * sName = bytes(SubScribeName,encoding='utf-8')
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ * pSub = pySubscribeInterface() # <<<<<<<<<<<<<<
+ * pSub.lpSubcribe = lpSub
+ * if lpSub == NULL:
+ */
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pySubscribeInterface)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_pSub = ((struct __pyx_obj_8py_t2sdk_pySubscribeInterface *)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "py_t2sdk.pyx":499
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ * pSub = pySubscribeInterface()
+ * pSub.lpSubcribe = lpSub # <<<<<<<<<<<<<<
+ * if lpSub == NULL:
+ * return -1,pSub
+ */
+ __pyx_v_pSub->lpSubcribe = __pyx_v_lpSub;
+
+ /* "py_t2sdk.pyx":500
+ * pSub = pySubscribeInterface()
+ * pSub.lpSubcribe = lpSub
+ * if lpSub == NULL: # <<<<<<<<<<<<<<
+ * return -1,pSub
+ * else:
+ */
+ __pyx_t_5 = ((__pyx_v_lpSub == NULL) != 0);
+ if (__pyx_t_5) {
+
+ /* "py_t2sdk.pyx":501
+ * pSub.lpSubcribe = lpSub
+ * if lpSub == NULL:
+ * return -1,pSub # <<<<<<<<<<<<<<
+ * else:
+ * return 0,pSub
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_neg_1);
+ __Pyx_INCREF(((PyObject *)__pyx_v_pSub));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub));
+ PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub));
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":500
+ * pSub = pySubscribeInterface()
+ * pSub.lpSubcribe = lpSub
+ * if lpSub == NULL: # <<<<<<<<<<<<<<
+ * return -1,pSub
+ * else:
+ */
+ }
+
+ /* "py_t2sdk.pyx":503
+ * return -1,pSub
+ * else:
+ * return 0,pSub # <<<<<<<<<<<<<<
+ * def GetMCLastError(self):
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
+ __Pyx_INCREF(((PyObject *)__pyx_v_pSub));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_pSub));
+ PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_pSub));
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "py_t2sdk.pyx":495
+ * cdef char* sMac = self.lpConnect.GetSelfMac()
+ * return sMac
+ * def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut): # <<<<<<<<<<<<<<
+ * sName = bytes(SubScribeName,encoding='utf-8')
+ * cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.NewSubscriber", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_sName);
+ __Pyx_XDECREF((PyObject *)__pyx_v_pSub);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":504
+ * else:
+ * return 0,pSub
+ * def GetMCLastError(self): # <<<<<<<<<<<<<<
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ * return lpMcErr
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetMCLastError (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_24GetMCLastError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ char *__pyx_v_lpMcErr;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetMCLastError", 0);
+
+ /* "py_t2sdk.pyx":505
+ * return 0,pSub
+ * def GetMCLastError(self):
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError() # <<<<<<<<<<<<<<
+ * return lpMcErr
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ */
+ __pyx_v_lpMcErr = __pyx_v_self->lpConnect->GetMCLastError();
+
+ /* "py_t2sdk.pyx":506
+ * def GetMCLastError(self):
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ * return lpMcErr # <<<<<<<<<<<<<<
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_lpMcErr); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":504
+ * else:
+ * return 0,pSub
+ * def GetMCLastError(self): # <<<<<<<<<<<<<<
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ * return lpMcErr
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetMCLastError", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":507
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ * return lpMcErr
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg(PyObject *__pyx_v_self, PyObject *__pyx_v_lppCallback) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Create2BizMsg (wrapper)", 0);
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lppCallback), __pyx_ptype_8py_t2sdk_pyCallbackInterface, 1, "lppCallback", 0))) __PYX_ERR(1, 507, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((struct __pyx_obj_8py_t2sdk_pyCallbackInterface *)__pyx_v_lppCallback));
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_26Create2BizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyCallbackInterface *__pyx_v_lppCallback) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("Create2BizMsg", 0);
+
+ /* "py_t2sdk.pyx":508
+ * return lpMcErr
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack) # <<<<<<<<<<<<<<
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->Create2BizMsg(__pyx_v_lppCallback->lpCallBack)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":507
+ * cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ * return lpMcErr
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback): # <<<<<<<<<<<<<<
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.Create2BizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":509
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<<
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = 0;
+ int __pyx_v_nAsy;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("SendBizMsg (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lpMsg,&__pyx_n_s_nAsy,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_lpMsg)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nAsy);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "SendBizMsg") < 0)) __PYX_ERR(1, 509, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)values[0]);
+ if (values[1]) {
+ __pyx_v_nAsy = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nAsy == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 509, __pyx_L3_error)
+ } else {
+ __pyx_v_nAsy = ((int)0);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("SendBizMsg", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 509, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_lpMsg), __pyx_ptype_8py_t2sdk_pyIBizMessage, 1, "lpMsg", 0))) __PYX_ERR(1, 509, __pyx_L1_error)
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_lpMsg, __pyx_v_nAsy);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_28SendBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg, int __pyx_v_nAsy) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("SendBizMsg", 0);
+
+ /* "py_t2sdk.pyx":510
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy) # <<<<<<<<<<<<<<
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ * lpMsg = pyIBizMessage()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->lpConnect->SendBizMsg(__pyx_v_lpMsg->lpBizMessage, __pyx_v_nAsy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":509
+ * def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ * return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0): # <<<<<<<<<<<<<<
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.SendBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":511
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<<
+ * lpMsg = pyIBizMessage()
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_hSend;
+ int __pyx_v_uiTimeout;
+ int __pyx_v_uiFlag;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("RecvBizMsg (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_hSend,&__pyx_n_s_uiTimeout,&__pyx_n_s_uiFlag,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_hSend)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiTimeout);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_uiFlag);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "RecvBizMsg") < 0)) __PYX_ERR(1, 511, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_hSend = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_hSend == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error)
+ if (values[1]) {
+ __pyx_v_uiTimeout = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_uiTimeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error)
+ } else {
+ __pyx_v_uiTimeout = ((int)0x3E8);
+ }
+ if (values[2]) {
+ __pyx_v_uiFlag = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_uiFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 511, __pyx_L3_error)
+ } else {
+ __pyx_v_uiFlag = ((int)0);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("RecvBizMsg", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 511, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_hSend, __pyx_v_uiTimeout, __pyx_v_uiFlag);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_30RecvBizMsg(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_hSend, int __pyx_v_uiTimeout, int __pyx_v_uiFlag) {
+ struct __pyx_obj_8py_t2sdk_pyIBizMessage *__pyx_v_lpMsg = NULL;
+ int __pyx_v_ret;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("RecvBizMsg", 0);
+
+ /* "py_t2sdk.pyx":512
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ * lpMsg = pyIBizMessage() # <<<<<<<<<<<<<<
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ * return ret,lpMsg
+ */
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_8py_t2sdk_pyIBizMessage)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_lpMsg = ((struct __pyx_obj_8py_t2sdk_pyIBizMessage *)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "py_t2sdk.pyx":513
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ * lpMsg = pyIBizMessage()
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag) # <<<<<<<<<<<<<<
+ * return ret,lpMsg
+ * def GetLastAnsError(self,int bAsyError=0):
+ */
+ __pyx_v_ret = __pyx_v_self->lpConnect->RecvBizMsg(__pyx_v_hSend, __pyx_v_lpMsg->lpBizMessage, __pyx_v_uiTimeout, __pyx_v_uiFlag);
+
+ /* "py_t2sdk.pyx":514
+ * lpMsg = pyIBizMessage()
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ * return ret,lpMsg # <<<<<<<<<<<<<<
+ * def GetLastAnsError(self,int bAsyError=0):
+ * return self.lpConnect.GetLastAnsError(bAsyError)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ret); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_INCREF(((PyObject *)__pyx_v_lpMsg));
+ __Pyx_GIVEREF(((PyObject *)__pyx_v_lpMsg));
+ PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_lpMsg));
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":511
+ * def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ * return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ * def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0): # <<<<<<<<<<<<<<
+ * lpMsg = pyIBizMessage()
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.RecvBizMsg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF((PyObject *)__pyx_v_lpMsg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "py_t2sdk.pyx":515
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ * return ret,lpMsg
+ * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetLastAnsError(bAsyError)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ int __pyx_v_bAsyError;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("GetLastAnsError (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_bAsyError,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (kw_args > 0) {
+ PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bAsyError);
+ if (value) { values[0] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "GetLastAnsError") < 0)) __PYX_ERR(1, 515, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ if (values[0]) {
+ __pyx_v_bAsyError = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_bAsyError == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 515, __pyx_L3_error)
+ } else {
+ __pyx_v_bAsyError = ((int)0);
+ }
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("GetLastAnsError", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 515, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), __pyx_v_bAsyError);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_32GetLastAnsError(struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, int __pyx_v_bAsyError) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("GetLastAnsError", 0);
+
+ /* "py_t2sdk.pyx":516
+ * return ret,lpMsg
+ * def GetLastAnsError(self,int bAsyError=0):
+ * return self.lpConnect.GetLastAnsError(bAsyError) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->lpConnect->GetLastAnsError(__pyx_v_bAsyError)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 516, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "py_t2sdk.pyx":515
+ * ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ * return ret,lpMsg
+ * def GetLastAnsError(self,int bAsyError=0): # <<<<<<<<<<<<<<
+ * return self.lpConnect.GetLastAnsError(bAsyError)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.GetLastAnsError", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_34__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__reduce_cython__", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2, __pyx_L1_error)
+
+ /* "(tree fragment)":1
+ * def __reduce_cython__(self): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
+static PyObject *__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(((struct __pyx_obj_8py_t2sdk_pyConnectionInterface *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_8py_t2sdk_21pyConnectionInterface_36__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_8py_t2sdk_pyConnectionInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__setstate_cython__", 0);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 4, __pyx_L1_error)
+
+ /* "(tree fragment)":3
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("py_t2sdk.pyConnectionInterface.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2UnPacker(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_13pyIF2UnPacker_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_13pyIF2UnPacker_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2UnPacker[] = {
+ {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_5GetVersion, METH_NOARGS, 0},
+ {"Open", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_7Open, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetDatasetCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_9GetDatasetCount, METH_NOARGS, 0},
+ {"SetCurrentDatasetByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_11SetCurrentDatasetByIndex, METH_O, 0},
+ {"SetCurrentDataset", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_13SetCurrentDataset, METH_O, 0},
+ {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_15GetPackBuf, METH_NOARGS, 0},
+ {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_17GetPackLen, METH_NOARGS, 0},
+ {"GetRowCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_19GetRowCount, METH_NOARGS, 0},
+ {"First", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_21First, METH_NOARGS, 0},
+ {"Last", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_23Last, METH_NOARGS, 0},
+ {"Go", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_25Go, METH_O, 0},
+ {"GetDatasetName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_27GetDatasetName, METH_NOARGS, 0},
+ {"GetColTypeByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_29GetColTypeByName, METH_O, 0},
+ {"GetColScaleByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_31GetColScaleByName, METH_O, 0},
+ {"GetColWidthByName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_33GetColWidthByName, METH_O, 0},
+ {"GetColCount", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_35GetColCount, METH_NOARGS, 0},
+ {"GetColName", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_37GetColName, METH_O, 0},
+ {"GetColType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_39GetColType, METH_O, 0},
+ {"GetColScale", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_41GetColScale, METH_O, 0},
+ {"GetColWidth", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_43GetColWidth, METH_O, 0},
+ {"FindColIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_45FindColIndex, METH_O, 0},
+ {"GetStrByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_47GetStrByIndex, METH_O, 0},
+ {"GetStr", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_49GetStr, METH_O, 0},
+ {"GetCharByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_51GetCharByIndex, METH_O, 0},
+ {"GetChar", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_53GetChar, METH_O, 0},
+ {"GetDoubleByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_55GetDoubleByIndex, METH_O, 0},
+ {"GetDouble", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_57GetDouble, METH_O, 0},
+ {"GetIntByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_59GetIntByIndex, METH_O, 0},
+ {"GetInt", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_61GetInt, METH_O, 0},
+ {"GetRawByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_63GetRawByIndex, METH_O, 0},
+ {"GetRaw", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_65GetRaw, METH_O, 0},
+ {"WasNull", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_67WasNull, METH_NOARGS, 0},
+ {"Next", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_69Next, METH_NOARGS, 0},
+ {"IsEOF", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_71IsEOF, METH_NOARGS, 0},
+ {"IsEmpty", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_73IsEmpty, METH_NOARGS, 0},
+ {"Destroy", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_75Destroy, METH_NOARGS, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_77Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_79__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIF2UnPacker_81__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyIF2UnPacker = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyIF2UnPacker", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyIF2UnPacker), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyIF2UnPacker, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyIF2UnPacker, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyIF2UnPacker, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIF2Packer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_11pyIF2Packer_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_11pyIF2Packer_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyIF2Packer[] = {
+ {"BeginPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_5BeginPack, METH_NOARGS, 0},
+ {"NewDataset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_7NewDataset, METH_VARARGS|METH_KEYWORDS, 0},
+ {"AddField", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_9AddField, METH_VARARGS|METH_KEYWORDS, 0},
+ {"AddStr", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_11AddStr, METH_O, 0},
+ {"AddInt", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_13AddInt, METH_O, 0},
+ {"AddDouble", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_15AddDouble, METH_O, 0},
+ {"AddChar", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_17AddChar, METH_O, 0},
+ {"AddRaw", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_11pyIF2Packer_19AddRaw, METH_VARARGS|METH_KEYWORDS, 0},
+ {"EndPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_21EndPack, METH_NOARGS, 0},
+ {"GetPackBuf", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_23GetPackBuf, METH_NOARGS, 0},
+ {"GetPackLen", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_25GetPackLen, METH_NOARGS, 0},
+ {"GetPackBufSize", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_27GetPackBufSize, METH_NOARGS, 0},
+ {"GetVersion", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_29GetVersion, METH_NOARGS, 0},
+ {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_31SetReturnCode, METH_O, 0},
+ {"UnPack", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_33UnPack, METH_NOARGS, 0},
+ {"FreeMem", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_35FreeMem, METH_NOARGS, 0},
+ {"ClearValue", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_37ClearValue, METH_NOARGS, 0},
+ {"BeginPackEx", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_39BeginPackEx, METH_O, 0},
+ {"ClearDataSet", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_41ClearDataSet, METH_NOARGS, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_43Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_45__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_11pyIF2Packer_47__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyIF2Packer = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyIF2Packer", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyIF2Packer), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyIF2Packer, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyIF2Packer, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyIF2Packer, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyCConfigInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_18pyCConfigInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_18pyCConfigInterface_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyCConfigInterface[] = {
+ {"Load", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_5Load, METH_O, 0},
+ {"Save", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_7Save, METH_O, 0},
+ {"GetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_9GetString, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_11GetInt, METH_VARARGS|METH_KEYWORDS, 0},
+ {"SetString", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_13SetString, METH_VARARGS|METH_KEYWORDS, 0},
+ {"SetInt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_18pyCConfigInterface_15SetInt, METH_VARARGS|METH_KEYWORDS, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_17Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_19__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_18pyCConfigInterface_21__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyCConfigInterface = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyCConfigInterface", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyCConfigInterface), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyCConfigInterface, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyCConfigInterface, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyCConfigInterface, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyIBizMessage(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_13pyIBizMessage_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_13pyIBizMessage_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyIBizMessage[] = {
+ {"SetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_5SetFunction, METH_O, 0},
+ {"GetFunction", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_7GetFunction, METH_NOARGS, 0},
+ {"SetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_9SetPacketType, METH_O, 0},
+ {"GetPacketType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_11GetPacketType, METH_NOARGS, 0},
+ {"SetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_13SetBranchNo, METH_O, 0},
+ {"GetBranchNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_15GetBranchNo, METH_NOARGS, 0},
+ {"SetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_17SetSystemNo, METH_O, 0},
+ {"GetSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_19GetSystemNo, METH_NOARGS, 0},
+ {"SetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_21SetSubSystemNo, METH_O, 0},
+ {"GetSubSystemNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_23GetSubSystemNo, METH_NOARGS, 0},
+ {"SetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_25SetSenderId, METH_O, 0},
+ {"GetSenderId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_27GetSenderId, METH_NOARGS, 0},
+ {"SetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_29SetPacketId, METH_O, 0},
+ {"GetPacketId", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_31GetPacketId, METH_NOARGS, 0},
+ {"SetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_33SetErrorNo, METH_O, 0},
+ {"GetErrorNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_35GetErrorNo, METH_NOARGS, 0},
+ {"SetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_37SetErrorInfo, METH_O, 0},
+ {"GetErrorInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_39GetErrorInfo, METH_NOARGS, 0},
+ {"SetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_41SetReturnCode, METH_O, 0},
+ {"GetReturnCode", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_43GetReturnCode, METH_NOARGS, 0},
+ {"SetContent", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_45SetContent, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetContent", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_47GetContent, METH_NOARGS, 0},
+ {"SetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_49SetIssueType, METH_O, 0},
+ {"GetIssueType", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_51GetIssueType, METH_NOARGS, 0},
+ {"SetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_53SetSequeceNo, METH_O, 0},
+ {"GetSequeceNo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_55GetSequeceNo, METH_NOARGS, 0},
+ {"SetKeyInfo", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_57SetKeyInfo, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetKeyInfo", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_59GetKeyInfo, METH_NOARGS, 0},
+ {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_61SetAppData, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_63GetAppData, METH_NOARGS, 0},
+ {"ChangeReq2AnsMessage", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_65ChangeReq2AnsMessage, METH_NOARGS, 0},
+ {"GetBuff", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_67GetBuff, METH_NOARGS, 0},
+ {"SetBuff", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_13pyIBizMessage_69SetBuff, METH_VARARGS|METH_KEYWORDS, 0},
+ {"ReSet", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_71ReSet, METH_NOARGS, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_73Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_75__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pyIBizMessage_77__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyIBizMessage = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyIBizMessage", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyIBizMessage), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyIBizMessage, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyIBizMessage, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyIBizMessage, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeParamInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_25pySubscribeParamInterface_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeParamInterface[] = {
+ {"SetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_5SetTopicName, METH_O, 0},
+ {"SetAppData", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_7SetAppData, METH_VARARGS|METH_KEYWORDS, 0},
+ {"SetFilter", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_9SetFilter, METH_VARARGS|METH_KEYWORDS, 0},
+ {"SetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_11SetReturnFiled, METH_O, 0},
+ {"SetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_13SetFromNow, METH_O, 0},
+ {"SetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_15SetReplace, METH_O, 0},
+ {"SetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_17SetSendInterval, METH_O, 0},
+ {"GetTopicName", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_19GetTopicName, METH_NOARGS, 0},
+ {"GetAppData", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_21GetAppData, METH_NOARGS, 0},
+ {"GetFilterNameByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_23GetFilterNameByIndex, METH_O, 0},
+ {"GetFilterValueByIndex", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_25GetFilterValueByIndex, METH_O, 0},
+ {"GetFilterValue", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_27GetFilterValue, METH_O, 0},
+ {"GetFilterCount", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_29GetFilterCount, METH_NOARGS, 0},
+ {"GetReturnFiled", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_31GetReturnFiled, METH_NOARGS, 0},
+ {"GetFromNow", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_33GetFromNow, METH_NOARGS, 0},
+ {"GetReplace", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_35GetReplace, METH_NOARGS, 0},
+ {"GetSendInterval", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_37GetSendInterval, METH_NOARGS, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_39Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_41__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_25pySubscribeParamInterface_43__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeParamInterface = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pySubscribeParamInterface", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeParamInterface), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pySubscribeParamInterface, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pySubscribeParamInterface, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pySubscribeParamInterface, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubCallBack(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_13pySubCallBack_1__cinit__(o, a, k) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pySubCallBack(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pySubCallBack[] = {
+ {"initInstance", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_3initInstance, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_5__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_13pySubCallBack_7__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pySubCallBack = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pySubCallBack", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pySubCallBack), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pySubCallBack, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pySubCallBack, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pySubCallBack, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pySubscribeInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_20pySubscribeInterface_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ {
+ PyObject *etype, *eval, *etb;
+ PyErr_Fetch(&etype, &eval, &etb);
+ ++Py_REFCNT(o);
+ __pyx_pw_8py_t2sdk_20pySubscribeInterface_3__dealloc__(o);
+ --Py_REFCNT(o);
+ PyErr_Restore(etype, eval, etb);
+ }
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pySubscribeInterface[] = {
+ {"SubscribeTopic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_20pySubscribeInterface_5SubscribeTopic, METH_VARARGS|METH_KEYWORDS, 0},
+ {"CancelSubscribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_7CancelSubscribeTopic, METH_O, 0},
+ {"GetSubcribeTopic", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_9GetSubcribeTopic, METH_O, 0},
+ {"Release", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_11Release, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_13__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_20pySubscribeInterface_15__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pySubscribeInterface = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pySubscribeInterface", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pySubscribeInterface), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pySubscribeInterface, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pySubscribeInterface, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pySubscribeInterface, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyCallbackInterface(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_19pyCallbackInterface_1__cinit__(o, a, k) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyCallbackInterface[] = {
+ {"InitInstance", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_3InitInstance, METH_NOARGS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_5__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_19pyCallbackInterface_7__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyCallbackInterface = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyCallbackInterface", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyCallbackInterface), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyCallbackInterface, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyCallbackInterface, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyCallbackInterface, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyObject *__pyx_tp_new_8py_t2sdk_pyConnectionInterface(PyTypeObject *t, PyObject *a, PyObject *k) {
+ PyObject *o;
+ if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
+ o = (*t->tp_alloc)(t, 0);
+ } else {
+ o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
+ }
+ if (unlikely(!o)) return 0;
+ if (unlikely(__pyx_pw_8py_t2sdk_21pyConnectionInterface_1__cinit__(o, a, k) < 0)) goto bad;
+ return o;
+ bad:
+ Py_DECREF(o); o = 0;
+ return NULL;
+}
+
+static void __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface(PyObject *o) {
+ #if CYTHON_USE_TP_FINALIZE
+ if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
+ if (PyObject_CallFinalizerFromDealloc(o)) return;
+ }
+ #endif
+ (*Py_TYPE(o)->tp_free)(o);
+}
+
+static PyMethodDef __pyx_methods_8py_t2sdk_pyConnectionInterface[] = {
+ {"Connect", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_3Connect, METH_O, 0},
+ {"Close", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_5Close, METH_NOARGS, 0},
+ {"GetServerAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_7GetServerAddress, METH_NOARGS, 0},
+ {"GetStatus", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_9GetStatus, METH_NOARGS, 0},
+ {"GetServerLoad", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_11GetServerLoad, METH_NOARGS, 0},
+ {"GetErrorMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_13GetErrorMsg, METH_O, 0},
+ {"GetConnectError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_15GetConnectError, METH_NOARGS, 0},
+ {"GetRealAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_17GetRealAddress, METH_NOARGS, 0},
+ {"GetSelfAddress", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_19GetSelfAddress, METH_NOARGS, 0},
+ {"GetSelfMac", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_21GetSelfMac, METH_NOARGS, 0},
+ {"NewSubscriber", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_23NewSubscriber, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetMCLastError", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_25GetMCLastError, METH_NOARGS, 0},
+ {"Create2BizMsg", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_27Create2BizMsg, METH_O, 0},
+ {"SendBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_29SendBizMsg, METH_VARARGS|METH_KEYWORDS, 0},
+ {"RecvBizMsg", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_31RecvBizMsg, METH_VARARGS|METH_KEYWORDS, 0},
+ {"GetLastAnsError", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_8py_t2sdk_21pyConnectionInterface_33GetLastAnsError, METH_VARARGS|METH_KEYWORDS, 0},
+ {"__reduce_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_35__reduce_cython__, METH_NOARGS, 0},
+ {"__setstate_cython__", (PyCFunction)__pyx_pw_8py_t2sdk_21pyConnectionInterface_37__setstate_cython__, METH_O, 0},
+ {0, 0, 0, 0}
+};
+
+static PyTypeObject __pyx_type_8py_t2sdk_pyConnectionInterface = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "py_t2sdk.pyConnectionInterface", /*tp_name*/
+ sizeof(struct __pyx_obj_8py_t2sdk_pyConnectionInterface), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_8py_t2sdk_pyConnectionInterface, /*tp_dealloc*/
+ #if PY_VERSION_HEX < 0x030800b4
+ 0, /*tp_print*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4
+ 0, /*tp_vectorcall_offset*/
+ #endif
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ __pyx_methods_8py_t2sdk_pyConnectionInterface, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_8py_t2sdk_pyConnectionInterface, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b1
+ 0, /*tp_vectorcall*/
+ #endif
+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
+ 0, /*tp_print*/
+ #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+ {0, 0, 0, 0}
+};
+
+static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
+ static const char* internal_type_names[] = {
+ "C_CConfigInterface",
+ "PyCapsule_Destructor",
+ "PyCapsule_Type",
+ "__pyx_ctuple_char__ptr__and_int",
+ "__pyx_ctuple_char__ptr__and_int_struct",
+ "__pyx_opt_args_22c_CConnectionInterface_NewSubscriber",
+ "c_CCallbackInterface",
+ "c_CConnectionInterface",
+ "c_CSubscribeInterface",
+ "c_CSubscribeParamInterface",
+ "c_IBizMessage",
+ "c_IF2Packer",
+ "c_IF2UnPacker",
+ "c_SubCallBack",
+ "const_char",
+ "const_void",
+ "div_t",
+ "ldiv_t",
+ "lldiv_t",
+ "pyCConfigInterface",
+ "pyCallbackInterface",
+ "pyConnectionInterface",
+ "pyIBizMessage",
+ "pyIF2Packer",
+ "pyIF2UnPacker",
+ "pySubCallBack",
+ "pySubscribeInterface",
+ "pySubscribeParamInterface",
+ "string",
+ 0
+ };
+ const char** type_name = internal_type_names;
+ while (*type_name) {
+ if (__Pyx_StrEq(name, *type_name)) {
+ PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
+ goto bad;
+ }
+ type_name++;
+ }
+ if (0);
+ else {
+ if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
+ }
+ return 0;
+ bad:
+ return -1;
+}
+
+static int
+__Pyx_import_all_from(PyObject *locals, PyObject *v)
+{
+ PyObject *all = PyObject_GetAttrString(v, "__all__");
+ PyObject *dict, *name, *value;
+ int skip_leading_underscores = 0;
+ int pos, err;
+ if (all == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+ return -1;
+ PyErr_Clear();
+ dict = PyObject_GetAttrString(v, "__dict__");
+ if (dict == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError))
+ return -1;
+ PyErr_SetString(PyExc_ImportError,
+ "from-import-* object has no __dict__ and no __all__");
+ return -1;
+ }
+#if PY_MAJOR_VERSION < 3
+ all = PyObject_CallMethod(dict, (char *)"keys", NULL);
+#else
+ all = PyMapping_Keys(dict);
+#endif
+ Py_DECREF(dict);
+ if (all == NULL)
+ return -1;
+ skip_leading_underscores = 1;
+ }
+ for (pos = 0, err = 0; ; pos++) {
+ name = PySequence_GetItem(all, pos);
+ if (name == NULL) {
+ if (!PyErr_ExceptionMatches(PyExc_IndexError))
+ err = -1;
+ else
+ PyErr_Clear();
+ break;
+ }
+ if (skip_leading_underscores &&
+#if PY_MAJOR_VERSION < 3
+ PyString_Check(name) &&
+ PyString_AS_STRING(name)[0] == '_')
+#else
+ PyUnicode_Check(name) &&
+ PyUnicode_AS_UNICODE(name)[0] == '_')
+#endif
+ {
+ Py_DECREF(name);
+ continue;
+ }
+ value = PyObject_GetAttr(v, name);
+ if (value == NULL)
+ err = -1;
+ else if (PyDict_CheckExact(locals))
+ err = PyDict_SetItem(locals, name, value);
+ else
+ err = PyObject_SetItem(locals, name, value);
+ Py_DECREF(name);
+ Py_XDECREF(value);
+ if (err != 0)
+ break;
+ }
+ Py_DECREF(all);
+ return err;
+}
+static int __pyx_import_star(PyObject* m) {
+ int i;
+ int ret = -1;
+ char* s;
+ PyObject *locals = 0;
+ PyObject *list = 0;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *utf8_name = 0;
+#endif
+ PyObject *name;
+ PyObject *item;
+ locals = PyDict_New(); if (!locals) goto bad;
+ if (__Pyx_import_all_from(locals, m) < 0) goto bad;
+ list = PyDict_Items(locals); if (!list) goto bad;
+ for(i=0; i= 3
+ utf8_name = PyUnicode_AsUTF8String(name);
+ if (!utf8_name) goto bad;
+ s = PyBytes_AS_STRING(utf8_name);
+ if (__pyx_import_star_set(item, name, s) < 0) goto bad;
+ Py_DECREF(utf8_name); utf8_name = 0;
+#else
+ s = PyString_AsString(name);
+ if (!s) goto bad;
+ if (__pyx_import_star_set(item, name, s) < 0) goto bad;
+#endif
+ }
+ ret = 0;
+bad:
+ Py_XDECREF(locals);
+ Py_XDECREF(list);
+#if PY_MAJOR_VERSION >= 3
+ Py_XDECREF(utf8_name);
+#endif
+ return ret;
+}
+
+
+
+#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_py_t2sdk(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_py_t2sdk},
+ {0, NULL}
+};
+#endif
+
+static struct PyModuleDef __pyx_moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "py_t2sdk",
+ 0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
+ -1, /* m_size */
+ #endif
+ __pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
+ NULL, /* m_reload */
+ #endif
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+#ifndef CYTHON_SMALL_CODE
+#if defined(__clang__)
+ #define CYTHON_SMALL_CODE
+#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
+ #define CYTHON_SMALL_CODE __attribute__((cold))
+#else
+ #define CYTHON_SMALL_CODE
+#endif
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1},
+ {&__pyx_n_s_SubScribeName, __pyx_k_SubScribeName, sizeof(__pyx_k_SubScribeName), 0, 0, 1, 1},
+ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+ {&__pyx_kp_s_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 0, 1, 0},
+ {&__pyx_n_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 1},
+ {&__pyx_n_s_bAsyError, __pyx_k_bAsyError, sizeof(__pyx_k_bAsyError), 0, 0, 1, 1},
+ {&__pyx_n_s_cFieldType, __pyx_k_cFieldType, sizeof(__pyx_k_cFieldType), 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_ctypes, __pyx_k_ctypes, sizeof(__pyx_k_ctypes), 0, 0, 1, 1},
+ {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
+ {&__pyx_n_s_filterName, __pyx_k_filterName, sizeof(__pyx_k_filterName), 0, 0, 1, 1},
+ {&__pyx_n_s_filterValue, __pyx_k_filterValue, sizeof(__pyx_k_filterValue), 0, 0, 1, 1},
+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_hSend, __pyx_k_hSend, sizeof(__pyx_k_hSend), 0, 0, 1, 1},
+ {&__pyx_n_s_iDefault, __pyx_k_iDefault, sizeof(__pyx_k_iDefault), 0, 0, 1, 1},
+ {&__pyx_n_s_iFieldScale, __pyx_k_iFieldScale, sizeof(__pyx_k_iFieldScale), 0, 0, 1, 1},
+ {&__pyx_n_s_iFieldWidth, __pyx_k_iFieldWidth, sizeof(__pyx_k_iFieldWidth), 0, 0, 1, 1},
+ {&__pyx_n_s_iLen, __pyx_k_iLen, sizeof(__pyx_k_iLen), 0, 0, 1, 1},
+ {&__pyx_n_s_iLength, __pyx_k_iLength, sizeof(__pyx_k_iLength), 0, 0, 1, 1},
+ {&__pyx_n_s_iReturnCode, __pyx_k_iReturnCode, sizeof(__pyx_k_iReturnCode), 0, 0, 1, 1},
+ {&__pyx_n_s_iTimeOut, __pyx_k_iTimeOut, sizeof(__pyx_k_iTimeOut), 0, 0, 1, 1},
+ {&__pyx_n_s_iValue, __pyx_k_iValue, sizeof(__pyx_k_iValue), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_n_s_lpAppdata, __pyx_k_lpAppdata, sizeof(__pyx_k_lpAppdata), 0, 0, 1, 1},
+ {&__pyx_n_s_lpBuff, __pyx_k_lpBuff, sizeof(__pyx_k_lpBuff), 0, 0, 1, 1},
+ {&__pyx_n_s_lpClass, __pyx_k_lpClass, sizeof(__pyx_k_lpClass), 0, 0, 1, 1},
+ {&__pyx_n_s_lpContent, __pyx_k_lpContent, sizeof(__pyx_k_lpContent), 0, 0, 1, 1},
+ {&__pyx_n_s_lpData, __pyx_k_lpData, sizeof(__pyx_k_lpData), 0, 0, 1, 1},
+ {&__pyx_n_s_lpKeyData, __pyx_k_lpKeyData, sizeof(__pyx_k_lpKeyData), 0, 0, 1, 1},
+ {&__pyx_n_s_lpMould, __pyx_k_lpMould, sizeof(__pyx_k_lpMould), 0, 0, 1, 1},
+ {&__pyx_n_s_lpMsg, __pyx_k_lpMsg, sizeof(__pyx_k_lpMsg), 0, 0, 1, 1},
+ {&__pyx_n_s_lpPack, __pyx_k_lpPack, sizeof(__pyx_k_lpPack), 0, 0, 1, 1},
+ {&__pyx_n_s_lpSubParam, __pyx_k_lpSubParam, sizeof(__pyx_k_lpSubParam), 0, 0, 1, 1},
+ {&__pyx_n_s_lpUnPack, __pyx_k_lpUnPack, sizeof(__pyx_k_lpUnPack), 0, 0, 1, 1},
+ {&__pyx_n_s_lppCallback, __pyx_k_lppCallback, sizeof(__pyx_k_lppCallback), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_nAppLen, __pyx_k_nAppLen, sizeof(__pyx_k_nAppLen), 0, 0, 1, 1},
+ {&__pyx_n_s_nAsy, __pyx_k_nAsy, sizeof(__pyx_k_nAsy), 0, 0, 1, 1},
+ {&__pyx_n_s_nBuffLen, __pyx_k_nBuffLen, sizeof(__pyx_k_nBuffLen), 0, 0, 1, 1},
+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+ {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
+ {&__pyx_n_s_pConfig, __pyx_k_pConfig, sizeof(__pyx_k_pConfig), 0, 0, 1, 1},
+ {&__pyx_n_s_pyCConfigInterface, __pyx_k_pyCConfigInterface, sizeof(__pyx_k_pyCConfigInterface), 0, 0, 1, 1},
+ {&__pyx_n_s_pyCallbackInterface, __pyx_k_pyCallbackInterface, sizeof(__pyx_k_pyCallbackInterface), 0, 0, 1, 1},
+ {&__pyx_n_s_pyConnectionInterface, __pyx_k_pyConnectionInterface, sizeof(__pyx_k_pyConnectionInterface), 0, 0, 1, 1},
+ {&__pyx_n_s_pyIBizMessage, __pyx_k_pyIBizMessage, sizeof(__pyx_k_pyIBizMessage), 0, 0, 1, 1},
+ {&__pyx_n_s_pyIF2Packer, __pyx_k_pyIF2Packer, sizeof(__pyx_k_pyIF2Packer), 0, 0, 1, 1},
+ {&__pyx_n_s_pyIF2UnPacker, __pyx_k_pyIF2UnPacker, sizeof(__pyx_k_pyIF2UnPacker), 0, 0, 1, 1},
+ {&__pyx_n_s_pySubCallBack, __pyx_k_pySubCallBack, sizeof(__pyx_k_pySubCallBack), 0, 0, 1, 1},
+ {&__pyx_n_s_pySubscribeInterface, __pyx_k_pySubscribeInterface, sizeof(__pyx_k_pySubscribeInterface), 0, 0, 1, 1},
+ {&__pyx_n_s_pySubscribeParamInterface, __pyx_k_pySubscribeParamInterface, sizeof(__pyx_k_pySubscribeParamInterface), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
+ {&__pyx_n_s_szDatasetName, __pyx_k_szDatasetName, sizeof(__pyx_k_szDatasetName), 0, 0, 1, 1},
+ {&__pyx_n_s_szDefault, __pyx_k_szDefault, sizeof(__pyx_k_szDefault), 0, 0, 1, 1},
+ {&__pyx_n_s_szEntry, __pyx_k_szEntry, sizeof(__pyx_k_szEntry), 0, 0, 1, 1},
+ {&__pyx_n_s_szFieldName, __pyx_k_szFieldName, sizeof(__pyx_k_szFieldName), 0, 0, 1, 1},
+ {&__pyx_n_s_szSection, __pyx_k_szSection, sizeof(__pyx_k_szSection), 0, 0, 1, 1},
+ {&__pyx_n_s_szValue, __pyx_k_szValue, sizeof(__pyx_k_szValue), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_n_s_uiFlag, __pyx_k_uiFlag, sizeof(__pyx_k_uiFlag), 0, 0, 1, 1},
+ {&__pyx_n_s_uiTimeout, __pyx_k_uiTimeout, sizeof(__pyx_k_uiTimeout), 0, 0, 1, 1},
+ {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__14);
+ __Pyx_GIVEREF(__pyx_tuple__14);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__15);
+ __Pyx_GIVEREF(__pyx_tuple__15);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__16);
+ __Pyx_GIVEREF(__pyx_tuple__16);
+
+ /* "(tree fragment)":2
+ * def __reduce_cython__(self):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ */
+ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 2, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
+
+ /* "(tree fragment)":4
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
+ * def __setstate_cython__(self, __pyx_state):
+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 4, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
+static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
+
+static int __Pyx_modinit_global_init_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
+ /*--- Global init code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_variable_export_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
+ /*--- Variable export code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_function_export_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
+ /*--- Function export code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_type_init_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
+ /*--- Type init code ---*/
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2UnPacker.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyIF2UnPacker.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2UnPacker, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2UnPacker) < 0) __PYX_ERR(1, 82, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyIF2UnPacker = &__pyx_type_8py_t2sdk_pyIF2UnPacker;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyIF2Packer.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIF2Packer.tp_dictoffset && __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyIF2Packer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIF2Packer, (PyObject *)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIF2Packer) < 0) __PYX_ERR(1, 12, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyIF2Packer = &__pyx_type_8py_t2sdk_pyIF2Packer;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyCConfigInterface.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCConfigInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyCConfigInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCConfigInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCConfigInterface) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyCConfigInterface = &__pyx_type_8py_t2sdk_pyCConfigInterface;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyIBizMessage.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyIBizMessage.tp_dictoffset && __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyIBizMessage.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyIBizMessage, (PyObject *)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyIBizMessage) < 0) __PYX_ERR(1, 243, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyIBizMessage = &__pyx_type_8py_t2sdk_pyIBizMessage;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pySubscribeParamInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeParamInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeParamInterface) < 0) __PYX_ERR(1, 367, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pySubscribeParamInterface = &__pyx_type_8py_t2sdk_pySubscribeParamInterface;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pySubCallBack.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubCallBack.tp_dictoffset && __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pySubCallBack.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubCallBack, (PyObject *)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubCallBack) < 0) __PYX_ERR(1, 425, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pySubCallBack = &__pyx_type_8py_t2sdk_pySubCallBack;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pySubscribeInterface.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pySubscribeInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pySubscribeInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pySubscribeInterface, (PyObject *)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pySubscribeInterface) < 0) __PYX_ERR(1, 434, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pySubscribeInterface = &__pyx_type_8py_t2sdk_pySubscribeInterface;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyCallbackInterface.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyCallbackInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyCallbackInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyCallbackInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyCallbackInterface) < 0) __PYX_ERR(1, 456, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyCallbackInterface = &__pyx_type_8py_t2sdk_pyCallbackInterface;
+ if (PyType_Ready(&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error)
+ #if PY_VERSION_HEX < 0x030800B1
+ __pyx_type_8py_t2sdk_pyConnectionInterface.tp_print = 0;
+ #endif
+ if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_8py_t2sdk_pyConnectionInterface.tp_dictoffset && __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro == PyObject_GenericGetAttr)) {
+ __pyx_type_8py_t2sdk_pyConnectionInterface.tp_getattro = __Pyx_PyObject_GenericGetAttr;
+ }
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_pyConnectionInterface, (PyObject *)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error)
+ if (__Pyx_setup_reduce((PyObject*)&__pyx_type_8py_t2sdk_pyConnectionInterface) < 0) __PYX_ERR(1, 465, __pyx_L1_error)
+ __pyx_ptype_8py_t2sdk_pyConnectionInterface = &__pyx_type_8py_t2sdk_pyConnectionInterface;
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_modinit_type_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
+ /*--- Type import code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_variable_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
+ /*--- Variable import code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+static int __Pyx_modinit_function_import_code(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
+ /*--- Function import code ---*/
+ __Pyx_RefNannyFinishContext();
+ return 0;
+}
+
+
+#if PY_MAJOR_VERSION < 3
+#ifdef CYTHON_NO_PYINIT_EXPORT
+#define __Pyx_PyMODINIT_FUNC void
+#else
+#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+#endif
+#else
+#ifdef CYTHON_NO_PYINIT_EXPORT
+#define __Pyx_PyMODINIT_FUNC PyObject *
+#else
+#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
+#endif
+#endif
+
+
+#if PY_MAJOR_VERSION < 3
+__Pyx_PyMODINIT_FUNC initpy_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/
+__Pyx_PyMODINIT_FUNC initpy_t2sdk(void)
+#else
+__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void) CYTHON_SMALL_CODE; /*proto*/
+__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
+ #if PY_VERSION_HEX >= 0x030700A1
+ static PY_INT64_T main_interpreter_id = -1;
+ PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
+ if (main_interpreter_id == -1) {
+ main_interpreter_id = current_id;
+ return (unlikely(current_id == -1)) ? -1 : 0;
+ } else if (unlikely(main_interpreter_id != current_id))
+ #else
+ static PyInterpreterState *main_interpreter = NULL;
+ PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
+ if (!main_interpreter) {
+ main_interpreter = current_interpreter;
+ } else if (unlikely(main_interpreter != current_interpreter))
+ #endif
+ {
+ PyErr_SetString(
+ PyExc_ImportError,
+ "Interpreter change detected - this module can only be loaded into one interpreter per process.");
+ return -1;
+ }
+ return 0;
+}
+static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ if (allow_none || value != Py_None) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ }
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__Pyx_check_single_interpreter())
+ return NULL;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static CYTHON_SMALL_CODE int __pyx_pymod_exec_py_t2sdk(PyObject *__pyx_pyinit_module)
+#endif
+#endif
+{
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m) {
+ if (__pyx_m == __pyx_pyinit_module) return 0;
+ PyErr_SetString(PyExc_RuntimeError, "Module 'py_t2sdk' has already been imported. Re-initialisation is not supported.");
+ return -1;
+ }
+ #elif PY_MAJOR_VERSION >= 3
+ if (__pyx_m) return __Pyx_NewRef(__pyx_m);
+ #endif
+ #if CYTHON_REFNANNY
+__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+}
+#endif
+ __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_py_t2sdk(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #ifdef __Pxy_PyFrame_Initialize_Offsets
+ __Pxy_PyFrame_Initialize_Offsets();
+ #endif
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("py_t2sdk", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_b);
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_cython_runtime);
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_py_t2sdk) {
+ if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "py_t2sdk")) {
+ if (unlikely(PyDict_SetItemString(modules, "py_t2sdk", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error;
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error;
+ /*--- Global type/function init code ---*/
+ (void)__Pyx_modinit_global_init_code();
+ (void)__Pyx_modinit_variable_export_code();
+ (void)__Pyx_modinit_function_export_code();
+ if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
+ (void)__Pyx_modinit_type_import_code();
+ (void)__Pyx_modinit_variable_import_code();
+ (void)__Pyx_modinit_function_import_code();
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ #endif
+
+ /* "py_t2sdk.pyx":6
+ * cimport py_t2sdk
+ * from cpython.pycapsule cimport *
+ * from ctypes import * # <<<<<<<<<<<<<<
+ * from libcpp.string cimport string
+ * from libc.stdlib cimport *
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s__19);
+ __Pyx_GIVEREF(__pyx_n_s__19);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__19);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_ctypes, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 6, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(1, 6, __pyx_L1_error);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "py_t2sdk.pyx":1
+ * # coding=utf-8 # <<<<<<<<<<<<<<
+ * # distutils: language = c++
+ *
+ */
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init py_t2sdk", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ }
+ Py_CLEAR(__pyx_m);
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init py_t2sdk");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
+ return __pyx_m;
+ #else
+ return;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule(modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, "RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* PyObjectGetAttrStr */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* KeywordStringCheck */
+static int __Pyx_CheckKeywordStrings(
+ PyObject *kwdict,
+ const char* function_name,
+ int kw_allowed)
+{
+ PyObject* key = 0;
+ Py_ssize_t pos = 0;
+#if CYTHON_COMPILING_IN_PYPY
+ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+ goto invalid_keyword;
+ return 1;
+#else
+ while (PyDict_Next(kwdict, &pos, &key, 0)) {
+ #if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyString_Check(key)))
+ #endif
+ if (unlikely(!PyUnicode_Check(key)))
+ goto invalid_keyword_type;
+ }
+ if ((!kw_allowed) && unlikely(key))
+ goto invalid_keyword;
+ return 1;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ return 0;
+#endif
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+ return 0;
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* ArgTypeTest */
+static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
+{
+ if (unlikely(!type)) {
+ PyErr_SetString(PyExc_SystemError, "Missing type object");
+ return 0;
+ }
+ else if (exact) {
+ #if PY_MAJOR_VERSION == 2
+ if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
+ #endif
+ }
+ else {
+ if (likely(__Pyx_TypeCheck(obj, type))) return 1;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
+ name, type->tp_name, Py_TYPE(obj)->tp_name);
+ return 0;
+}
+
+/* PyObjectCall */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* bytes_index */
+static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) {
+ if (index < 0)
+ index += PyBytes_GET_SIZE(bytes);
+ if (check_bounds) {
+ Py_ssize_t size = PyBytes_GET_SIZE(bytes);
+ if (unlikely(!__Pyx_is_valid_index(index, size))) {
+ PyErr_SetString(PyExc_IndexError, "string index out of range");
+ return (char) -1;
+ }
+ }
+ return PyBytes_AS_STRING(bytes)[index];
+}
+
+/* GetItemInt */
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* PyFunctionFastCall */
+#if CYTHON_FAST_PYCALL
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, (int)nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, (int)nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif
+#endif
+
+/* PyObjectCallMethO */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallNoArg */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
+#else
+ if (likely(PyCFunction_Check(func)))
+#endif
+ {
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* PyErrFetchRestore */
+#if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* RaiseException */
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+ if (cause) {
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* decode_c_string */
+static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
+ const char* cstring, Py_ssize_t start, Py_ssize_t stop,
+ const char* encoding, const char* errors,
+ PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
+ Py_ssize_t length;
+ if (unlikely((start < 0) | (stop < 0))) {
+ size_t slen = strlen(cstring);
+ if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
+ PyErr_SetString(PyExc_OverflowError,
+ "c-string too long to convert to Python");
+ return NULL;
+ }
+ length = (Py_ssize_t) slen;
+ if (start < 0) {
+ start += length;
+ if (start < 0)
+ start = 0;
+ }
+ if (stop < 0)
+ stop += length;
+ }
+ length = stop - start;
+ if (unlikely(length <= 0))
+ return PyUnicode_FromUnicode(NULL, 0);
+ cstring += start;
+ if (decode_func) {
+ return decode_func(cstring, length, errors);
+ } else {
+ return PyUnicode_Decode(cstring, length, encoding, errors);
+ }
+}
+
+/* PyDictVersioning */
+#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
+ PyObject *dict = Py_TYPE(obj)->tp_dict;
+ return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
+}
+static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
+ PyObject **dictptr = NULL;
+ Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
+ if (offset) {
+#if CYTHON_COMPILING_IN_CPYTHON
+ dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
+#else
+ dictptr = _PyObject_GetDictPtr(obj);
+#endif
+ }
+ return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
+}
+static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
+ PyObject *dict = Py_TYPE(obj)->tp_dict;
+ if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
+ return 0;
+ return obj_dict_version == __Pyx_get_object_dict_version(obj);
+}
+#endif
+
+/* GetModuleGlobalName */
+#if CYTHON_USE_DICT_VERSIONS
+static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
+#else
+static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
+#endif
+{
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
+ result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+ if (likely(result)) {
+ return __Pyx_NewRef(result);
+ } else if (unlikely(PyErr_Occurred())) {
+ return NULL;
+ }
+#else
+ result = PyDict_GetItem(__pyx_d, name);
+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+ if (likely(result)) {
+ return __Pyx_NewRef(result);
+ }
+#endif
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
+ if (likely(result)) {
+ return __Pyx_NewRef(result);
+ }
+ PyErr_Clear();
+#endif
+ return __Pyx_GetBuiltinName(name);
+}
+
+/* PyObject_GenericGetAttrNoDict */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
+ PyErr_Format(PyExc_AttributeError,
+#if PY_MAJOR_VERSION >= 3
+ "'%.50s' object has no attribute '%U'",
+ tp->tp_name, attr_name);
+#else
+ "'%.50s' object has no attribute '%.400s'",
+ tp->tp_name, PyString_AS_STRING(attr_name));
+#endif
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
+ PyObject *descr;
+ PyTypeObject *tp = Py_TYPE(obj);
+ if (unlikely(!PyString_Check(attr_name))) {
+ return PyObject_GenericGetAttr(obj, attr_name);
+ }
+ assert(!tp->tp_dictoffset);
+ descr = _PyType_Lookup(tp, attr_name);
+ if (unlikely(!descr)) {
+ return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
+ }
+ Py_INCREF(descr);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
+ #endif
+ {
+ descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
+ if (unlikely(f)) {
+ PyObject *res = f(descr, obj, (PyObject *)tp);
+ Py_DECREF(descr);
+ return res;
+ }
+ }
+ return descr;
+}
+#endif
+
+/* PyObject_GenericGetAttr */
+#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
+static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
+ if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
+ return PyObject_GenericGetAttr(obj, attr_name);
+ }
+ return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
+}
+#endif
+
+/* SetupReduce */
+static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
+ int ret;
+ PyObject *name_attr;
+ name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name);
+ if (likely(name_attr)) {
+ ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
+ } else {
+ ret = -1;
+ }
+ if (unlikely(ret < 0)) {
+ PyErr_Clear();
+ ret = 0;
+ }
+ Py_XDECREF(name_attr);
+ return ret;
+}
+static int __Pyx_setup_reduce(PyObject* type_obj) {
+ int ret = 0;
+ PyObject *object_reduce = NULL;
+ PyObject *object_reduce_ex = NULL;
+ PyObject *reduce = NULL;
+ PyObject *reduce_ex = NULL;
+ PyObject *reduce_cython = NULL;
+ PyObject *setstate = NULL;
+ PyObject *setstate_cython = NULL;
+#if CYTHON_USE_PYTYPE_LOOKUP
+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
+#else
+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
+#endif
+#if CYTHON_USE_PYTYPE_LOOKUP
+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
+#else
+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
+#endif
+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
+ if (reduce_ex == object_reduce_ex) {
+#if CYTHON_USE_PYTYPE_LOOKUP
+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
+#else
+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
+#endif
+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
+ if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
+ reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
+ setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
+ if (!setstate) PyErr_Clear();
+ if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
+ setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
+ }
+ PyType_Modified((PyTypeObject*)type_obj);
+ }
+ }
+ goto GOOD;
+BAD:
+ if (!PyErr_Occurred())
+ PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
+ ret = -1;
+GOOD:
+#if !CYTHON_USE_PYTYPE_LOOKUP
+ Py_XDECREF(object_reduce);
+ Py_XDECREF(object_reduce_ex);
+#endif
+ Py_XDECREF(reduce);
+ Py_XDECREF(reduce_ex);
+ Py_XDECREF(reduce_cython);
+ Py_XDECREF(setstate);
+ Py_XDECREF(setstate_cython);
+ return ret;
+}
+
+/* Import */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* CLineInTraceback */
+#ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ if (unlikely(!__pyx_cython_runtime)) {
+ return c_line;
+ }
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
+ use_cline, *cython_runtime_dict,
+ __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
+/* CodeObjectCache */
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+#include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntFromPyVerify */
+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntToPy */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
+ const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(int) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(int) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(int) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(int),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntToPy */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntToPy */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
+ const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(char) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(char) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(char) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(char),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPy */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* CIntFromPy */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CIntFromPy */
+static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
+ const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(char) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (char) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (char) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
+ case 2:
+ if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
+ return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
+ return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
+ return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (char) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(char) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (char) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
+ return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
+ return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(char) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ char val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (char) -1;
+ }
+ } else {
+ char val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (char) -1;
+ val = __Pyx_PyInt_As_char(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to char");
+ return (char) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to char");
+ return (char) -1;
+}
+
+/* FastTypeChecks */
+#if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+ Py_ssize_t i, n;
+ assert(PyExceptionClass_Check(exc_type));
+ n = PyTuple_GET_SIZE(tuple);
+#if PY_MAJOR_VERSION >= 3
+ for (i=0; ip) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ return -1;
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
+#else
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
+ int retval;
+ if (unlikely(!x)) return -1;
+ retval = __Pyx_PyObject_IsTrue(x);
+ Py_DECREF(x);
+ return retval;
+}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
+#else
+ if (likely(PyLong_Check(x)))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = m->nb_long(x);
+ }
+ #else
+ if (likely(m && m->nb_int)) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ #endif
+#else
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
+#endif
+ if (likely(res)) {
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
+#else
+ if (unlikely(!PyLong_CheckExact(res))) {
+#endif
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(b);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
+ return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd
new file mode 100644
index 0000000000..7e2fd76920
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pxd
@@ -0,0 +1,188 @@
+# coding=utf-8
+# distutils: language = c++
+
+cdef extern from "ufx_interface.h":
+ cdef cppclass c_IF2UnPacker
+
+ cdef cppclass c_IF2Packer:
+ c_IF2Packer() except+
+ void SetBuffer(char* pBuf,int iBufSize,int iDataLen)
+ void BeginPack()
+ int NewDataset(char *szDatasetName, int iReturnCode)
+ int AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale)
+ int AddStr(char *szValue)
+ int AddInt(int iValue)
+ int AddDouble(double fValue)
+ int AddChar(char* cValue)
+ int AddRaw(char* lpBuff,int iLen)
+ void EndPack()
+ int* GetPackBuf()
+ int GetPackLen()
+ int GetPackBufSize()
+ int GetVersion()
+ void SetReturnCode(long dwRetCode)
+ c_IF2UnPacker* UnPack()
+ void FreeMem()
+ void ClearValue()
+ void BeginPackEx(char* szName)
+ void ClearDataSet()
+ void Release()
+
+ cdef cppclass c_IF2UnPacker:
+ c_IF2UnPacker(char* lpBuffer,int iLen) except+
+ c_IF2UnPacker(c_IF2Packer* lpPacker) except+
+ int GetVersion()
+ char* GetErrorInfo()
+ int Open(char* lpBuffer,int iLen)
+ int GetDatasetCount()
+ int SetCurrentDatasetByIndex(int nIndex)
+ int SetCurrentDataset(char *szDatasetName)
+ char* GetPackBuf()
+ int GetPackLen()
+ int GetRowCount()
+ void First()
+ void Last()
+ void Go(int nRow)
+ char* GetDatasetName()
+ int OpenAndCopy(char* lpBuffer,int iLen)
+ char* GetColTypeByName(char* columnName)
+ int GetColScaleByName(char* columnName)
+ int GetColWidthByName(char* columnName)
+ int GetColCount();
+ char* GetColName(int column);
+ char* GetColType(int column);
+ int GetColScale(int column);
+ int GetColWidth(int column);
+ int FindColIndex(char * columnName);
+ char* GetStrByIndex(int column);
+ char* GetStr(char * columnName);
+ char* GetCharByIndex(int column);
+ char* GetChar(char * columnName);
+ double GetDoubleByIndex( int column);
+ double GetDouble(char * columnName);
+ int GetIntByIndex(int column);
+ int GetInt(char * columnName);
+ char* GetRawByIndex(int column,int * lpRawLen);
+ char* GetRaw(char * columnName,int * lpRawLen);
+ int WasNull();
+ void Next();
+ int IsEOF();
+ int IsEmpty();
+ void Destroy();
+ void Release()
+
+ cdef cppclass C_CConfigInterface:
+ C_CConfigInterface() except+
+ int Load(char *szFileName)
+ int Save(char *szFileName)
+ char * GetString(char *szSection, char *szEntry, char *szDefault)
+ int GetInt(char *szSection, char *szEntry, int iDefault)
+ int SetString(char *szSection, char *szEntry, char *szValue)
+ int SetInt(char *szSection, char *szEntry, int iValue)
+ void Release()
+
+ cdef cppclass c_IBizMessage:
+ c_IBizMessage() except+
+ void SetFunction(int nFUnctionNo)
+ int GetFunction()
+ void SetPacketType(int nPacketType)
+ int GetPacketType()
+ void SetBranchNo(int nBranchNo)
+ int GetBranchNo()
+ void SetSystemNo(int nSystemNo)
+ int GetSystemNo()
+ void SetSubSystemNo(int nSubSystemNo)
+ int GetSubSystemNo()
+ void SetSenderId(int nSenderId)
+ int GetSenderId()
+ void SetPacketId(int nPacketId)
+ int GetPacketId()
+ void SetErrorNo(int nErrorNo)
+ int GetErrorNo()
+ void SetErrorInfo(char* strErrorInfo)
+ char* GetErrorInfo()
+ void SetReturnCode(int nReturnCode)
+ int GetReturnCode()
+ void SetContent(char* lpContent,int iLen)
+ char* GetContent(int& iLen)
+ void SetIssueType(int nIssueType)
+ int GetIssueType()
+ void SetSequeceNo(int nSequeceNo)
+ int GetSequeceNo()
+ void SetKeyInfo(char* lpKeyData,int iLen)
+ char* GetKeyInfo(int& iLen)
+ void SetAppData(char* lpAppdata,int nAppLen)
+ char* GetAppData(int& nAppLen)
+ int ChangeReq2AnsMessage()
+ char* GetBuff(int& nBuffLen)
+ int SetBuff(char* lpBuff,int nBuffLen)
+ void ReSet()
+ void Release()
+
+ cdef cppclass c_CSubscribeParamInterface:
+ c_CSubscribeParamInterface() except+
+ void SetTopicName(char* szName)
+ void SetAppData(char* lpData,int iLen)
+ void SetFilter(char* filterName,char* filterValue)
+ void SetReturnFiled(char* filedName)
+ void SetFromNow(int bFromNow)
+ void SetReplace(int bReplace)
+ void SetSendInterval(int nSendInterval)
+ char* GetTopicName()
+ char* GetAppData(int *iLen)
+ char* GetFilterNameByIndex(int index)
+ char* GetFilterValueByIndex(int index)
+ char* GetFilterValue(char* fileName)
+ int GetFilterCount()
+ char* GetReturnFiled()
+ int GetFromNow()
+ int GetReplace()
+ int GetSendInterval()
+ void Release()
+
+ cdef cppclass c_SubCallBack:
+ c_SubCallBack(char *lpMould,char *lpClass) except+
+ c_SubCallBack() except+
+ int initInstance()
+
+ cdef cppclass c_CSubscribeInterface:
+ int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack);
+ int CancelSubscribeTopic(int subscribeIndex)
+ void GetSubcribeTopic(c_IF2Packer* lpPack)
+ void Release();
+
+ cdef cppclass c_CCallbackInterface:
+ c_CCallbackInterface(char* sMould,char* sClass) except+
+ c_CCallbackInterface() except+
+ int InitInstance()
+
+ cdef cppclass c_CConnectionInterface:
+ c_CConnectionInterface(C_CConfigInterface* lpConfig) except+
+ int Create(c_CCallbackInterface *lpCallback)
+ int Connect(unsigned int uiTimeout)
+ int Close()
+ char* GetServerAddress(int *lpPort)
+ int GetStatus()
+ int GetServerLoad()
+ char* GetErrorMsg(int nErrorCode)
+ int GetConnectError()
+ int SendBiz(int iFunID, c_IF2Packer *lpPacker, int nAsy, int iSystemNo, int nCompressID)
+ int RecvBiz(int hSend, c_IF2UnPacker **lppUnPackerOrStr, int uiTimeout, int uiFlag)
+ int SendBizEx(int iFunID, c_IF2Packer *lpPacker,char* svrName, int nAsy, int iSystemNo, int nCompressID,int branchNo)
+ int RecvBizEx(int hSend, c_IF2UnPacker **lppUnpackerOrStr, unsigned uiTimeout, unsigned uiFlag)
+ int CreateEx(c_CCallbackInterface *lpCallback)
+ char* GetRealAddress()
+ int Reserved8()
+ int Reserved9()
+ char* GetSelfAddress()
+ char* GetSelfMac()
+ c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut,
+ int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN)
+ c_IF2UnPacker* GetTopic(int byForce,int iTimeOut)
+ char* GetMCLastError()
+ int Create2BizMsg(c_CCallbackInterface *lpCallback)
+ int SendBizMsg(c_IBizMessage* lpMsg,int nAsy)
+ int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag)
+ int Reserved10()
+ int Reserved11()
+ char* GetLastAnsError(int bAsyError)
diff --git a/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx
new file mode 100644
index 0000000000..2dbe2d2943
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/py_t2sdk.pyx
@@ -0,0 +1,519 @@
+# coding=utf-8
+# distutils: language = c++
+
+cimport py_t2sdk
+from cpython.pycapsule cimport *
+from ctypes import *
+from libcpp.string cimport string
+from libc.stdlib cimport *
+
+cdef class pyIF2UnPacker
+
+cdef class pyIF2Packer:
+ cdef c_IF2Packer* lpPacker
+ def __cinit__(self):
+ self.lpPacker = new c_IF2Packer()
+ def __dealloc__(self):
+ del self.lpPacker
+ def BeginPack(self):
+ self.lpPacker.BeginPack()
+ def NewDataset(self,str szDatasetName, int iReturnCode):
+ sName = bytes(szDatasetName,encoding='utf-8')
+ return self.lpPacker.NewDataset(sName,iReturnCode)
+ def AddField(self,str szFieldName,str cFieldType='S',int iFieldWidth=255,int iFieldScale=4):
+ sName = bytes(szFieldName,encoding='utf-8')
+ sType = bytes(cFieldType,encoding='utf-8')
+ return self.lpPacker.AddField(sName,sType[0],iFieldWidth,iFieldScale)
+ def AddStr(self,str szValue):
+ sValue = bytes(szValue,encoding='utf-8')
+ return self.lpPacker.AddStr(sValue)
+ def AddInt(self,int iValue):
+ return self.lpPacker.AddInt(iValue)
+ def AddDouble(self,double fValue):
+ return self.lpPacker.AddDouble(fValue)
+ def AddChar(self,str cValue):
+ sValue = bytes(cValue,encoding='utf-8')
+ return self.lpPacker.AddChar(sValue[0])
+ def AddRaw(self,list lpBuff,int iLen):
+ cdef char* sBuff = malloc(iLen)
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ sBuff[iIndex] = lpBuff[iIndex]
+ iIndex+=1
+ iRet = self.lpPacker.AddRaw(sBuff,iLen)
+ free(sBuff)
+ return iRet
+ def EndPack(self):
+ return self.lpPacker.EndPack()
+ def GetPackBuf(self):
+ cdef int iLength = self.lpPacker.GetPackLen()
+ cdef int* sBuff = self.lpPacker.GetPackBuf()
+ lpBuff = []
+ cdef int iIndex = 0
+ while iIndex < iLength:
+ lpBuff.append(sBuff[iIndex])
+ iIndex +=1
+ return lpBuff
+ def GetPackLen(self):
+ return self.lpPacker.GetPackLen()
+ def GetPackBufSize(self):
+ return self.lpPacker.GetPackBufSize()
+ def GetVersion(self):
+ return self.lpPacker.GetVersion()
+ def SetReturnCode(self,long dwRetCode):
+ self.lpPacker.SetReturnCode(dwRetCode)
+ def UnPack(self):
+ cdef c_IF2UnPacker* lpUnpacker = self.lpPacker.UnPack()
+ lpPyUnpacker = pyIF2UnPacker()
+ lpPyUnpacker.lpUnpacker = lpUnpacker
+ return lpPyUnpacker
+ def FreeMem(self):
+ self.lpPacker.FreeMem()
+ def ClearValue(self):
+ self.lpPacker.ClearValue()
+ def BeginPackEx(self,str szName):
+ sName = bytes(szName,encoding='utf-8')
+ self.lpPacker.BeginPackEx(sName)
+ def ClearDataSet(self):
+ self.lpPacker.ClearDataSet()
+ def Release(self):
+ self.lpPacker.Release()
+
+cdef class pyIF2UnPacker:
+ cdef c_IF2UnPacker* lpUnpacker
+ def __cinit__(self):
+ self.lpUnpacker = NULL
+ def __dealloc__(self):
+ if self.lpUnpacker != NULL:
+ del self.lpUnpacker
+ self.lpUnpacker = NULL
+ def GetVersion(self):
+ return self.lpUnpacker.GetVersion()
+ def Open(self,list lpBuff,int iLen):
+ cdef char* sBuff = malloc(iLen)
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ sBuff[iIndex] = lpBuff[iIndex]
+ iIndex+=1
+ if self.lpUnpacker == NULL:
+ self.lpUnpacker = new c_IF2UnPacker(sBuff,iLen)
+ iRet = 0
+ else:
+ iRet = self.lpUnpacker.Open(sBuff,iLen)
+ free(sBuff)
+ return iRet
+ def GetDatasetCount(self):
+ if self.lpUnpacker == NULL:
+ return -1;
+ return self.lpUnpacker.GetDatasetCount()
+ def SetCurrentDatasetByIndex(self,int nIndex):
+ self.lpUnpacker.SetCurrentDatasetByIndex(nIndex)
+ def SetCurrentDataset(self,str szDatasetName):
+ sName = bytes(szDatasetName,encoding='utf-8')
+ self.lpUnpacker.SetCurrentDataset(sName)
+ def GetPackBuf(self):
+ cdef char* lpBuff = self.lpUnpacker.GetPackBuf()
+ return lpBuff
+ def GetPackLen(self):
+ return self.lpUnpacker.GetPackLen()
+ def GetRowCount(self):
+ return self.lpUnpacker.GetRowCount()
+ def First(self):
+ self.lpUnpacker.First()
+ def Last(self):
+ self.lpUnpacker.Last()
+ def Go(self,int nRow):
+ self.lpUnpacker.Go(nRow)
+ def GetDatasetName(self):
+ cdef char* sName = self.lpUnpacker.GetDatasetName()
+ return sName
+ def GetColTypeByName(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ cdef char* sType = self.lpUnpacker.GetColTypeByName(sName)
+ return sType.decode('gbk')
+ def GetColScaleByName(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ return self.lpUnpacker.GetColScaleByName(sName)
+ def GetColWidthByName(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ return self.lpUnpacker.GetColWidthByName(sName)
+ def GetColCount(self):
+ return self.lpUnpacker.GetColCount()
+ def GetColName(self,int column):
+ return self.lpUnpacker.GetColName(column).decode('gbk')
+ def GetColType(self,int column):
+ cdef char* sType = self.lpUnpacker.GetColType(column)
+ return sType.decode('gbk')
+ def GetColScale(self,int column):
+ return self.lpUnpacker.GetColScale(column)
+ def GetColWidth(self,int column):
+ return self.lpUnpacker.GetColWidth(column)
+ def FindColIndex(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ return self.lpUnpacker.FindColIndex(sName)
+ def GetStrByIndex(self,int column):
+ return self.lpUnpacker.GetStrByIndex(column).decode('GBK')
+ def GetStr(self,str columnName):
+ sName = bytes(columnName,encoding='UTF-8')
+ return self.lpUnpacker.GetStr(sName).decode('GBK')
+ def GetCharByIndex(self,int column):
+ return self.lpUnpacker.GetCharByIndex(column).decode('UTF-8')
+ def GetChar(self,str columnName):
+ sName = bytes(columnName,encoding='UTF-8')
+ return self.lpUnpacker.GetChar(sName).decode('UTF-8')
+ def GetDoubleByIndex(self, int column):
+ return self.lpUnpacker.GetDoubleByIndex(column)
+ def GetDouble(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ return self.lpUnpacker.GetDouble(sName)
+ def GetIntByIndex(self,int column):
+ return self.lpUnpacker.GetIntByIndex(column)
+ def GetInt(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ if self.lpUnpacker == NULL:
+ return -1
+ return self.lpUnpacker.GetInt(sName)
+ def GetRawByIndex(self,int column):
+ cdef int ilength = 0
+ cdef char* sBuff = self.lpUnpacker.GetRawByIndex(column,&ilength)
+ lpBuff = []
+ cdef int iIndex = 0
+ while iIndex < iLength:
+ lpBuff.append(sBuff[iIndex])
+ iIndex +=1
+ return lpBuff,ilength
+ def GetRaw(self,str columnName):
+ sName = bytes(columnName,encoding='utf-8')
+ cdef int ilength = 0
+ cdef char* sBuff = self.lpUnpacker.GetRaw(sName,&ilength)
+ lpBuff = []
+ cdef int iIndex = 0
+ while iIndex < iLength:
+ lpBuff.append(sBuff[iIndex])
+ iIndex +=1
+ return lpBuff,ilength
+ def WasNull(self):
+ return self.lpUnpacker.WasNull()
+ def Next(self):
+ self.lpUnpacker.Next()
+ def IsEOF(self):
+ return self.lpUnpacker.IsEOF()
+ def IsEmpty(self):
+ return self.lpUnpacker.IsEmpty()
+ def Destroy(self):
+ self.lpUnpacker.Destroy()
+ def Release(self):
+ if self.lpUnpacker != NULL:
+ self.lpUnpacker.Release()
+
+cdef class pyCConfigInterface:
+ cdef C_CConfigInterface* lpConfig
+ def __cinit__(self):
+ self.lpConfig = new C_CConfigInterface()
+ def __dealloc__(self):
+ del self.lpConfig
+ def Load(self,str szFileName):
+ sName = bytes(szFileName,encoding='utf-8')
+ return self.lpConfig.Load(sName)
+ def Save(self,str szFileName):
+ sName = bytes(szFileName,encoding='utf-8')
+ return self.lpConfig.Save(sName)
+ def GetString(self,str szSection,str szEntry,str szDefault):
+ sSection = bytes(szSection,encoding='utf-8')
+ sEntry = bytes(szEntry,encoding='utf-8')
+ sDefault = bytes(szDefault,encoding='utf-8')
+ cdef char* sValue = self.lpConfig.GetString(sSection,sEntry,sDefault)
+ return sValue
+ def GetInt(self,str szSection,str szEntry, int iDefault):
+ sSection = bytes(szSection,encoding='utf-8')
+ sEntry = bytes(szEntry,encoding='utf-8')
+ return self.lpConfig.GetInt(sSection,sEntry,iDefault)
+ def SetString(self,str szSection,str szEntry,str szValue):
+ sSection = bytes(szSection,encoding='utf-8')
+ sEntry = bytes(szEntry,encoding='utf-8')
+ sValue = bytes(szValue,encoding='utf-8')
+ return self.lpConfig.SetString(sSection,sEntry,sValue)
+ def SetInt(self,str szSection,str szEntry, int iValue):
+ sSection = bytes(szSection,encoding='utf-8')
+ sEntry = bytes(szEntry,encoding='utf-8')
+ return self.lpConfig.SetInt(sSection,sEntry,iValue)
+ def Release(self):
+ self.lpConfig.Release()
+
+cdef class pyIBizMessage:
+ cdef c_IBizMessage* lpBizMessage
+ def __cinit__(self):
+ self.lpBizMessage = new c_IBizMessage()
+ def __dealloc__(self):
+ del self.lpBizMessage
+ def SetFunction(self,int nFUnctionNo):
+ self.lpBizMessage.SetFunction(nFUnctionNo)
+ def GetFunction(self):
+ return self.lpBizMessage.GetFunction()
+ def SetPacketType(self,int nPacketType):
+ self.lpBizMessage.SetPacketType(nPacketType)
+ def GetPacketType(self):
+ return self.lpBizMessage.GetPacketType()
+ def SetBranchNo(self,int nBranchNo):
+ self.lpBizMessage.SetBranchNo(nBranchNo)
+ def GetBranchNo(self):
+ return self.lpBizMessage.GetBranchNo()
+ def SetSystemNo(self,int nSystemNo):
+ self.lpBizMessage.SetSystemNo(nSystemNo)
+ def GetSystemNo(self):
+ return self.lpBizMessage.GetSystemNo()
+ def SetSubSystemNo(self,int nSubSystemNo):
+ self.lpBizMessage.SetSubSystemNo(nSubSystemNo)
+ def GetSubSystemNo(self):
+ return self.lpBizMessage.GetSubSystemNo()
+ def SetSenderId(self,int nSenderId):
+ self.lpBizMessage.SetSenderId(nSenderId)
+ def GetSenderId(self):
+ return self.lpBizMessage.GetSenderId()
+ def SetPacketId(self,int nPacketId):
+ self.lpBizMessage.SetPacketId(nPacketId)
+ def GetPacketId(self):
+ return self.lpBizMessage.GetPacketId()
+ def SetErrorNo(self,int nErrorNo):
+ self.lpBizMessage.SetErrorNo(nErrorNo)
+ def GetErrorNo(self):
+ return self.lpBizMessage.GetErrorNo()
+ def SetErrorInfo(self,str strErrorInfo):
+ sErrorInfo = bytes(strErrorInfo,encoding='utf-8')
+ self.lpBizMessage.SetErrorInfo(sErrorInfo)
+ def GetErrorInfo(self):
+ cdef char* sErrInfo = self.lpBizMessage.GetErrorInfo()
+ return sErrInfo
+ def SetReturnCode(self,int nReturnCode):
+ self.lpBizMessage.SetReturnCode(nReturnCode)
+ def GetReturnCode(self):
+ return self.lpBizMessage.GetReturnCode()
+ def SetContent(self,list lpContent,int iLen):
+ cdef char* sBuff = malloc(iLen)
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ sBuff[iIndex] = lpContent[iIndex]
+ iIndex+=1
+ self.lpBizMessage.SetContent(sBuff,iLen)
+ free(sBuff)
+ def GetContent(self):
+ cdef int iLen = 0
+ cdef char* sBuff = self.lpBizMessage.GetContent(iLen)
+ lpBuff = []
+ cdef iTemp = 0
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ iTemp = sBuff[iIndex]
+ lpBuff.append(iTemp)
+ iIndex +=1
+ return lpBuff,iLen
+ def SetIssueType(self,int nIssueType):
+ self.lpBizMessage.SetIssueType(nIssueType)
+ def GetIssueType(self):
+ return self.lpBizMessage.GetIssueType()
+ def SetSequeceNo(self,int nSequeceNo):
+ self.lpBizMessage.SetSequeceNo(nSequeceNo)
+ def GetSequeceNo(self):
+ return self.lpBizMessage.GetSequeceNo()
+ def SetKeyInfo(self,list lpKeyData,int iLen):
+ cdef char* sBuff = malloc(iLen)
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ sBuff[iIndex] = lpKeyData[iIndex]
+ iIndex+=1
+ self.lpBizMessage.SetKeyInfo(sBuff,iLen)
+ def GetKeyInfo(self):
+ cdef int iLen = 0
+ cdef int itemp = 0
+ cdef char* sBuff = self.lpBizMessage.GetKeyInfo(iLen)
+ lpBuff = []
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ lpBuff.append(sBuff[iIndex])
+ iIndex +=1
+ return lpBuff,iLen
+ def SetAppData(self,str lpAppdata,int nAppLen):
+ sAppData = bytes(lpAppdata,encoding='utf-8')
+ self.lpBizMessage.SetAppData(sAppData,nAppLen)
+ def GetAppData(self):
+ cdef int iLen = 0
+ cdef char* sAppData = self.lpBizMessage.GetAppData(iLen)
+ return sAppData,iLen
+ def ChangeReq2AnsMessage(self):
+ self.lpBizMessage.ChangeReq2AnsMessage()
+ def GetBuff(self):
+ cdef int iLen = 0
+ cdef iTemp = 0
+ cdef char* sBuff = self.lpBizMessage.GetBuff(iLen)
+ lpBuff = []
+ cdef int iIndex = 0
+ while iIndex < iLen:
+ iTemp = sBuff[iIndex]
+ lpBuff.append(iTemp)
+ iIndex +=1
+ return lpBuff,iLen
+ def SetBuff(self,list lpBuff,int nBuffLen):
+ cdef char* sBuff = malloc(nBuffLen)
+ cdef int iIndex = 0
+ while iIndex < nBuffLen:
+ sBuff[iIndex] = lpBuff[iIndex]
+ iIndex+=1
+ self.lpBizMessage.SetBuff(sBuff,nBuffLen)
+ def ReSet(self):
+ self.lpBizMessage.ReSet()
+ def Release(self):
+ self.lpBizMessage.Release()
+
+cdef class pySubscribeParamInterface:
+ cdef c_CSubscribeParamInterface* lpSubscribeParam
+ def __cinit__(self):
+ self.lpSubscribeParam = new c_CSubscribeParamInterface()
+ def __dealloc__(self):
+ del self.lpSubscribeParam
+ def SetTopicName(self,str szName):
+ sName = bytes(szName,encoding='utf-8')
+ self.lpSubscribeParam.SetTopicName(sName)
+ def SetAppData(self,str lpData,int iLen):
+ sData = bytes(lpData,encoding='utf-8')
+ self.lpSubscribeParam.SetAppData(sData,iLen)
+ def SetFilter(self,str filterName,str filterValue):
+ sName = bytes(filterName,encoding='utf-8')
+ sValue = bytes(filterValue,encoding='utf-8')
+ self.lpSubscribeParam.SetFilter(sName,sValue)
+ def SetReturnFiled(self,str filedName):
+ sName = bytes(filedName,encoding='utf-8')
+ self.lpSubscribeParam.SetReturnFiled(sName)
+ def SetFromNow(self,int bFromNow):
+ self.lpSubscribeParam.SetFromNow(bFromNow)
+ def SetReplace(self,int bReplace):
+ self.lpSubscribeParam.SetReplace(bReplace)
+ def SetSendInterval(self,int nSendInterval):
+ self.lpSubscribeParam.SetSendInterval(nSendInterval)
+ def GetTopicName(self):
+ cdef char* sName = self.lpSubscribeParam.GetTopicName()
+ return sName
+ def GetAppData(self):
+ cdef int iLen = 0
+ cdef char* sAppData = self.lpSubscribeParam.GetAppData(&iLen)
+ return sAppData,iLen
+ def GetFilterNameByIndex(self,int index):
+ cdef char* sName = self.lpSubscribeParam.GetFilterNameByIndex(index)
+ return sName
+ def GetFilterValueByIndex(self,int index):
+ cdef char* sName = self.lpSubscribeParam.GetFilterValueByIndex(index)
+ return sName
+ def GetFilterValue(self,str fileName):
+ sName = bytes(fileName,encoding='utf-8')
+ sValus = self.lpSubscribeParam.GetFilterValue(sName)
+ return sValus
+ def GetFilterCount(self):
+ return self.lpSubscribeParam.GetFilterCount()
+ def GetReturnFiled(self):
+ cdef char* sFields = self.lpSubscribeParam.GetReturnFiled()
+ return sFields
+ def GetFromNow(self):
+ cdef int bFromNow = self.lpSubscribeParam.GetFromNow()
+ return bFromNow
+ def GetReplace(self):
+ cdef int bRep = self.lpSubscribeParam.GetReplace()
+ return bRep
+ def GetSendInterval(self):
+ return self.lpSubscribeParam.GetSendInterval()
+ def Release(self):
+ return self.lpSubscribeParam.Release()
+
+cdef class pySubCallBack:
+ cdef c_SubCallBack* lpSubCallBack
+ def __cinit__(self,str lpMould,str lpClass):
+ sMould = bytes(lpMould,encoding='utf-8')
+ sClass = bytes(lpClass,encoding='utf-8')
+ self.lpSubCallBack = new c_SubCallBack(sMould,sClass)
+ def initInstance(self):
+ return self.lpSubCallBack.initInstance()
+
+cdef class pySubscribeInterface:
+ cdef c_CSubscribeInterface* lpSubcribe
+ def __cinit__(self):
+ self.lpSubcribe = NULL
+ def __dealloc__(self):
+ if self.lpSubcribe != NULL:
+ del self.lpSubcribe
+ self.lpSubcribe = NULL
+ def SubscribeTopic(self,pySubscribeParamInterface lpSubParam,int uiTimeout,pyIF2UnPacker lpUnPack = None,pyIF2Packer lpPack = None):
+ cdef c_IF2UnPacker** lppBizUnPack = NULL
+ cdef c_IF2Packer* lpBizPack = NULL
+ if lpUnPack != None and lpPack != None:
+ lppBizUnPack = &(lpUnPack.lpUnpacker)
+ lpBizPack = lpPack.lpPacker
+ cdef int ret = self.lpSubcribe.SubscribeTopic(lpSubParam.lpSubscribeParam,uiTimeout,lppBizUnPack,lpBizPack)
+ return ret
+ def CancelSubscribeTopic(self,int subscribeIndex):
+ return self.lpSubcribe.CancelSubscribeTopic(subscribeIndex)
+ def GetSubcribeTopic(self,pyIF2Packer lpPack):
+ return self.lpSubcribe.GetSubcribeTopic(lpPack.lpPacker)
+ def Release(self):
+ return self.lpSubcribe.Release()
+cdef class pyCallbackInterface:
+ cdef c_CCallbackInterface* lpCallBack
+ def __cinit__(self,str lpMould,str lpClass):
+ sMould = bytes(lpMould,encoding='utf-8')
+ sClass = bytes(lpClass,encoding='utf-8')
+ self.lpCallBack = new c_CCallbackInterface(sMould,sClass)
+ def InitInstance(self):
+ return self.lpCallBack.InitInstance()
+
+cdef class pyConnectionInterface:
+ cdef c_CConnectionInterface* lpConnect
+ def __cinit__(self,pyCConfigInterface pConfig):
+ self.lpConnect = new c_CConnectionInterface(pConfig.lpConfig)
+ def Connect(self,int uiTimeout):
+ return self.lpConnect.Connect(uiTimeout)
+ def Close(self):
+ return self.lpConnect.Close()
+ def GetServerAddress(self):
+ cdef int iPort = 0
+ cdef char* sAddress = self.lpConnect.GetServerAddress(&iPort)
+ return sAddress,iPort
+ def GetStatus(self):
+ return self.lpConnect.GetStatus()
+ def GetServerLoad(self):
+ return self.lpConnect.GetServerLoad()
+ def GetErrorMsg(self,int nErrorCode):
+ cdef char* sErrMsg = self.lpConnect.GetErrorMsg(nErrorCode)
+ return sErrMsg.decode('GBK')
+ def GetConnectError(self):
+ return self.lpConnect.GetConnectError()
+ def GetRealAddress(self):
+ cdef char* sAddress = self.lpConnect.GetRealAddress()
+ return sAddress
+ def GetSelfAddress(self):
+ cdef char* sAddress = self.lpConnect.GetSelfAddress()
+ return sAddress
+ def GetSelfMac(self):
+ cdef char* sMac = self.lpConnect.GetSelfMac()
+ return sMac
+ def NewSubscriber(self,pySubCallBack lppCallback,str SubScribeName,int iTimeOut):
+ sName = bytes(SubScribeName,encoding='utf-8')
+ cdef c_CSubscribeInterface* lpSub = self.lpConnect.NewSubscriber(lppCallback.lpSubCallBack,sName,iTimeOut)
+ pSub = pySubscribeInterface()
+ pSub.lpSubcribe = lpSub
+ if lpSub == NULL:
+ return -1,pSub
+ else:
+ return 0,pSub
+ def GetMCLastError(self):
+ cdef char* lpMcErr = self.lpConnect.GetMCLastError()
+ return lpMcErr
+ def Create2BizMsg(self,pyCallbackInterface lppCallback):
+ return self.lpConnect.Create2BizMsg(lppCallback.lpCallBack)
+ def SendBizMsg(self,pyIBizMessage lpMsg,int nAsy=0):
+ return self.lpConnect.SendBizMsg(lpMsg.lpBizMessage,nAsy)
+ def RecvBizMsg(self,int hSend, int uiTimeout=1000, int uiFlag=0):
+ lpMsg = pyIBizMessage()
+ ret = self.lpConnect.RecvBizMsg(hSend,lpMsg.lpBizMessage,uiTimeout,uiFlag)
+ return ret,lpMsg
+ def GetLastAnsError(self,int bAsyError=0):
+ return self.lpConnect.GetLastAnsError(bAsyError)
+
+
+
\ No newline at end of file
diff --git a/vnpy/api/t2sdk/py_t2sdk/setup.py b/vnpy/api/t2sdk/py_t2sdk/setup.py
new file mode 100644
index 0000000000..16aea8e6fe
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/setup.py
@@ -0,0 +1,22 @@
+#from distutils.core import setup, Extension
+from distutils.core import setup
+from distutils.extension import Extension
+from Cython.Distutils import build_ext
+from Cython.Build import cythonize
+
+setup(
+ name='py_t2sdk',
+ version='1.0.0',
+ author='rdc@hundsun',
+ author_email='',
+ url='',
+ ext_modules = cythonize(Extension(
+ 'py_t2sdk',
+ sources=['py_t2sdk.pyx','ufx_interface.cpp'],
+ language='c++',
+ include_dirs=[],
+ library_dirs=[],
+ libraries=['t2sdk'],
+ extra_compile_args=[],
+ extra_link_args=[]
+)))
\ No newline at end of file
diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib
new file mode 100644
index 0000000000..3ca9f05a6d
Binary files /dev/null and b/vnpy/api/t2sdk/py_t2sdk/t2sdk.lib differ
diff --git a/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h
new file mode 100644
index 0000000000..6ed77b9097
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/t2sdk_interface.h
@@ -0,0 +1,1812 @@
+#include
+#include
+
+#ifndef _T2SDK_INTERFACE_H
+# define _T2SDK_INTERFACE_H
+
+#ifdef _WIN32
+ #if !defined( FUNCTION_CALL_MODE )
+ #define FUNCTION_CALL_MODE __stdcall
+ #endif
+#else
+ #define FUNCTION_CALL_MODE
+#endif
+
+#ifndef HS_IKNOWN_SDK
+#define HS_IKNOWN_SDK
+struct IKnown
+{
+ virtual unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv) = 0;
+
+ virtual unsigned long FUNCTION_CALL_MODE AddRef() = 0;
+
+ virtual unsigned long FUNCTION_CALL_MODE Release() = 0;
+
+ ~IKnown(){}
+};
+#endif
+
+#include
+
+#ifdef _WIN32
+typedef unsigned int uint32;
+#else
+#include
+#if defined(__linux__)
+#include
+#endif
+typedef uint32_t uint32;
+#endif
+
+///ESBȣΪɼַܰʵָոֺ;
+#define IDENTITY_NAME_LENGTH 32
+///ʵռλ
+#define ID_LENGTH 4
+///ڵȫ,ʱʹchar sName[ID_STR_LEN+1]
+#define ID_STR_LEN (IDENTITY_NAME_LENGTH + ID_LENGTH + 1)
+
+
+// ӿ,ʱʹchar sName[PLUGINID_LENGTH+1]
+#define PLUGINID_LENGTH 256
+// ʵ,ʱʹchar sName[PLUGIN_NAME_LENGTH+1]
+#define PLUGIN_NAME_LENGTH (PLUGINID_LENGTH+ID_LENGTH+1)
+// .ʱʹchar sName[SVR_NAME_LENGTH+1]
+#define SVR_NAME_LENGTH 256
+// ʵ.ʱʹchar sName[PLUGINID_NAME_LENGTH+1]
+#define SVRINSTANCE_NAME_LENGTH (SVR_NAME_LENGTH+ID_LENGTH+1)
+
+//ļбֶ
+/** ļ£ºΪAPIļ¹佻Ĵеֶ */
+#define PACKER_INT_FILE_LIST "file_list" /**< ļб */
+#define PACKER_INT_FILE_ID "file_id" /**< ļid */
+#define PACKER_INT_FILE_SIZE "file_size" /**< ļС */
+#define PACKER_INT_TIME "time" /**< ļʱ */
+#define PACKER_STRING_FILE_NAME "file_name" /**< ļ */
+#define PACKER_STRING_FILE_PATH "file_path" /**< ļ· */
+#define PACKER_STRING_LOCAL_PATH "local_path" /**< ļ· */
+#define PACKER_STRING_MD5_CODE "md5_code" /**< ļmd5ֵ */
+#define PACKER_STRING_FILE_FLAG "file_flag" /**< ļʶ */
+
+//ҵϢ
+//
+#define REQUEST_PACKET 0
+//Ӧ
+#define ANSWER_PACKET 1
+//20110302 xuxp ·ϢĽṹ嶨
+typedef struct tagRouteInfo
+{
+ char ospfName[ID_STR_LEN+1];
+ char nbrName[ID_STR_LEN+1];
+ char svrName[SVRINSTANCE_NAME_LENGTH+1];
+ char pluginID[PLUGIN_NAME_LENGTH+1];
+ int connectID;
+ int memberNO;
+
+ tagRouteInfo()
+ {
+ memset(this,0,sizeof(tagRouteInfo));
+ }
+}Route_Info;
+
+
+//20101228 xuxp Ϊ˷ͺͷضϢӵĽṹĶ
+typedef struct tagRequestData
+{
+ int sequeceNo;
+ int issueType;
+ void* lpKeyInfo;
+ int keyInfoLen;
+ void* lpFileHead;
+ int fileHeadLen;
+ int packetType;//20100111 xuxp ¼ӵİ
+ Route_Info routeInfo;//20110302 xuxp ·Ϣ
+ int iSubSystemNo;//20130508 xuxp ϵͳŴ
+ int iCompanyID;//20140114 xuxp ӹ˾
+}REQ_DATA, *LPREQ_DATA;
+typedef struct tagRespondData
+{
+ int functionID;
+ int returnCode;
+ int errorNo;
+ char* errorInfo;
+ int issueType;
+ void* lpKeyInfo;
+ int keyInfoLen;
+ Route_Info sendInfo;//20110302 xuxp ӦӷϢ
+}RET_DATA, *LPRET_DATA;
+
+//20150209 majc Ӻ궨
+#define T2SDK_MAX_BRANCH_NO_LEN 256
+#define T2SDK_MAX_COMPANY_NO_LEN 256
+#define T2SDK_MAX_OSPF_LEN 256
+
+//20150209 majc Ӵʱָ·ɲṹ嶨
+typedef struct tagSubRouteInfo
+{
+ int iSystemNo; //ϵͳ
+ int iSubSystemNo; //ϵͳ
+ char szBranchNo[T2SDK_MAX_BRANCH_NO_LEN+1]; //֧
+ char szCompanyNo[T2SDK_MAX_COMPANY_NO_LEN+1]; //˾
+ char szOspfName[T2SDK_MAX_OSPF_LEN+1]; //OSPF
+ tagSubRouteInfo()
+ {
+ memset(this,0,sizeof(tagSubRouteInfo));
+ }
+}SUB_ROUTER_INFO;
+
+///ӿ
+struct IF2ResultSet : public IKnown
+{
+
+ ///ȡֶ
+ /**@return ֶ.
+ */
+ virtual int FUNCTION_CALL_MODE GetColCount()=0;
+
+ ///ȡֶ
+ /** @param column:ֶ(0Ϊ)
+ * @return ֶ ±Խ NULL
+ */
+ virtual const char * FUNCTION_CALL_MODE GetColName(int column)=0;
+
+ //ȡֶ
+ /** @param column:ֶ(0Ϊ)
+ * @return:泣;±Խ -1
+ */
+ virtual char FUNCTION_CALL_MODE GetColType(int column)=0;
+
+
+ ///ȡֶСλ
+ /** @param column:ֶ(0Ϊ)
+ * @return int ֶСλ ±Խ -1
+ */
+ virtual int FUNCTION_CALL_MODE GetColScale(int column)=0;
+
+ //ȡֶݵ.
+ /** @param column:ֶ(0Ϊ)
+ * @return int ֶο ±Խ -1
+ */
+ virtual int FUNCTION_CALL_MODE GetColWidth(int column) = 0;
+
+ ///ȡֶӦֶ
+ /**@param columnName: ֶ
+ *@return ֶ. ڷ-1
+ */
+ virtual int FUNCTION_CALL_MODE FindColIndex(const char * columnName)=0;
+
+ //
+ //ֶ(0Ϊ)ȡֵֶ(ַ)
+ /**@param column:ֶ(0Ϊ)
+ *@return ֵֶַ,±Խ緵NULL
+ */
+ virtual const char * FUNCTION_CALL_MODE GetStrByIndex(int column)=0;
+
+ //ֶȡֵֶ(ַ)
+ /**@param columnName: ֶ
+ *@return ֵֶַ,ڷNULL
+ */
+ virtual const char * FUNCTION_CALL_MODE GetStr(const char * columnName)=0;
+
+ //ֶ(0Ϊ)ȡֵֶ
+ /**@param column:ֶ(0Ϊ)
+ *@return ֵֶַ,±Խ緵'\0'.
+ */
+ virtual char FUNCTION_CALL_MODE GetCharByIndex(int column)=0;
+
+ //ֶȡֵֶ
+ /**@param columnName: ֶ
+ *@return ֵֶַ,ڷ'\0'
+ */
+ virtual char FUNCTION_CALL_MODE GetChar(const char * columnName)=0;
+
+ //ֶţȡֵֶ
+ /**@param column:ֶ(0Ϊ)
+ *@return doubleֵֶ,±Խ緵0
+ */
+ virtual double FUNCTION_CALL_MODE GetDoubleByIndex( int column)=0;
+
+ ///ֶȡֵֶ
+ /**@param columnName:ֶ
+ *@return doubleֵֶ,ڷ0
+ */
+ virtual double FUNCTION_CALL_MODE GetDouble(const char * columnName)=0;
+
+ ///ֶţȡֵֶ
+ /**@param column:ֶ(0Ϊ)
+ *@return intֵֶ,±Խ緵0
+ */
+ virtual int FUNCTION_CALL_MODE GetIntByIndex(int column)=0;
+
+ ///ֶȡֵֶ
+ /**@param columnName:ֶ
+ *@return intֵֶ,ڷ0
+ */
+ virtual int FUNCTION_CALL_MODE GetInt(const char * columnName)=0;
+
+ ///ֶŻֵֶ,
+ /**@param column: ֶ(0Ϊ)
+ *@param lpRawLen: [out]ݳ
+ *@return : ַ
+ */
+ virtual void * FUNCTION_CALL_MODE GetRawByIndex(int column,int * lpRawLen) = 0;
+
+ ///ֶȡֵֶ
+ /**@param columnName:ֶ
+ *@param lpRawLen: [out]ݳ
+ *@return : ַ
+ */
+ virtual void * FUNCTION_CALL_MODE GetRaw(const char * columnName,int * lpRawLen) = 0;
+
+
+ ///һȡֵֶǷΪNULL
+ /**@return 0 ǣ 1
+ */
+ virtual int FUNCTION_CALL_MODE WasNull()=0;
+
+ ///ȡһ¼
+ virtual void FUNCTION_CALL_MODE Next()=0;
+
+ ///жǷΪβ
+ /**@return 1 ǣ0 ;
+ */
+ virtual int FUNCTION_CALL_MODE IsEOF()=0;
+
+ ///жǷΪ
+ /**@return 1 ǣ0 ;
+ */
+ virtual int FUNCTION_CALL_MODE IsEmpty()=0;
+
+ virtual void * FUNCTION_CALL_MODE Destroy() = 0;
+};
+
+struct IF2UnPacker;
+
+///ӿ(һж칹)
+/**ִ:
+ *
+ * 0(ѡ, иò, IF2Packerڲڴ滺) SetBuffer(),ɵṩ,BeginPack()֮ǰ;
+ *
+ * 1ʼ: BeginPack(),λ;
+ *
+ * 2һ
+ *
+ *(a)ֶбAddField()
+ *
+ *(b)սά˳ֶΣ¼ֶݣAddStr() {AddInt(), AddDouble(), AddRaw()}
+ *
+ * 3ýķ(ѡ, Ϊ0) SetReturnCode()
+ *
+ * 4һ(ѡ) NewDataSet()˴ͬʱ˸ýķ룻
+ *
+ * 5ο2ʵһ(ѡ)
+ *
+ * 6EndPack(),ظûᵼ¼ս;
+ *
+ * 7ȡ(Сݳ)
+ * ҲֱӽUnPack()ؽӿ
+ *
+ *ʹע:IF2Packerʹõڴ滺ɵ߸գ
+ * ķ룬ֻڰʽ汾0x21ʱЧ
+ */
+struct IF2Packer : public IKnown
+{
+ ///ʼ(ʹõߵĻ)
+ /** һʹôʱʹñúû(ݳȱΪiDataLen)
+ *@param char * pBuf ַ
+ *@param int iBufSize ռ
+ *@param int iDataLen ݳȣݼֻ֮V1.0ʽİЧ
+ */
+ virtual void FUNCTION_CALL_MODE SetBuffer(void * pBuf,int iBufSize,int iDataLen=0 )=0;
+
+ ///λ¿ʼһ(ֶ¼Ϊ00)
+ /**
+ * ܣʼѰ(ظʹеĻռ)
+ *@return
+ */
+ virtual void FUNCTION_CALL_MODE BeginPack(void)=0;
+
+ ///ʼһ
+ /**ڴİʱԲñ,ȡĬֵ
+ *@param const char *szDatasetName 0x20Ҫָ
+ *@param int iReturnCode 0x20ҪΪÿֵָ
+ */
+ virtual int FUNCTION_CALL_MODE NewDataset(const char *szDatasetName, int iReturnCode = 0)=0;
+
+ /**
+ * ܣֶ
+ *
+ *ִдҪ: NewDataset()Reset(),SetBuffer()֮,ֶΰ˳;
+ *
+ *@param szFieldNameֶ
+ *@param cFieldType ֶ:IDCַSַR
+ *@param iFieldWidth ֶοȣռֽ
+ *@param iFieldScale ֶξ,cFieldType='D'ʱСλ(ȱʡΪ4λС)
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddField(const char *szFieldName,char cFieldType ='S',int iFieldWidth=255,int iFieldScale=4)=0;
+
+ /**
+ * ܣַ
+ * ִдҪ:ֶ֮,ֶΰ˳;
+ *@param szValueַ
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddStr(const char *szValue)=0;
+
+ /**
+ * ܣ
+ *@param iValue
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddInt(int iValue)=0;
+
+ /**
+ * ܣӸ
+ *@param fValue
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddDouble(double fValue)=0;
+
+ /**
+ * ܣһַ
+ *@param cValueַ
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddChar(char cValue)=0;
+
+ /**
+ * ܣһ
+ *@param void * lpBuff
+ *@param int iLen ݳ
+ *@return ʾʧܣΪĿǰij
+ */
+ virtual int FUNCTION_CALL_MODE AddRaw(void * lpBuff,int iLen)=0;
+
+ ///
+ virtual void FUNCTION_CALL_MODE EndPack()=0;
+
+ /**
+ * ܣȡָ
+ *@return ָ
+ */
+ virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0;
+
+ /**
+ * ܣȡ
+ *@return
+ */
+ virtual int FUNCTION_CALL_MODE GetPackLen(void) = 0;
+
+ /**
+ * ܣȡС
+ *@return С
+ */
+ virtual int FUNCTION_CALL_MODE GetPackBufSize(void) = 0;
+
+ /**
+ * ܣȡʽ汾
+ *@return 汾
+ */
+ virtual int FUNCTION_CALL_MODE GetVersion(void) = 0;
+
+ ///ýķ(0x20Ҫ)Ҫ
+ /**ȡȱʡֵ0ããEndPack()֮ǰ
+ *@return 汾
+ */
+ virtual void FUNCTION_CALL_MODE SetReturnCode(unsigned long dwRetCode) = 0;
+
+ /**ֱӷصǰĽӿ,EndPack()֮ܵ,ڴͷʱӦĽʵҲͷ
+ *@return ӿڣ˽ӿڲܵ destroy()ͷ
+ */
+ virtual IF2UnPacker * FUNCTION_CALL_MODE UnPack(void) = 0;
+
+ /**
+ *
+ */
+ virtual void FUNCTION_CALL_MODE FreeMem(void* lpBuf) = 0;
+
+ /**
+ *
+ */
+ virtual void FUNCTION_CALL_MODE ClearValue() = 0;
+
+
+ //20110302 xuxp һӿںݵһ
+ ///λ¿ʼһ(ֶ¼Ϊ00)
+ /**
+ * ܣʼѰ(ظʹеĻռ)
+ *@return
+ */
+ virtual void FUNCTION_CALL_MODE BeginPackEx(char* szName = NULL) = 0;
+
+ //20110324 dongpf һӿںλǰ
+ ///λǰ(ֶ¼Ϊ00)Ӱ
+ /**
+ * ܣλǰ
+ *@return
+ */
+ virtual void FUNCTION_CALL_MODE ClearDataSet() = 0;
+};
+
+///ӿ
+struct IF2UnPacker : public IF2ResultSet
+{
+ /**ȡʽ汾
+ *@return 汾
+ */
+ virtual int FUNCTION_CALL_MODE GetVersion(void) = 0;
+
+ /**ȡݳ
+ *@return 0 ʾɹ Ϊʧ
+ */
+ virtual int FUNCTION_CALL_MODE Open(void * lpBuffer,unsigned int iLen) = 0;
+
+ ///ȡ(0x20ϰ汾֧)
+ virtual int FUNCTION_CALL_MODE GetDatasetCount()=0;
+
+ ///õǰ(0x20ϰ汾֧)
+ /**
+ *@param int nIndex
+ *@return int 0 ʾɹΪʧ
+ */
+ virtual int FUNCTION_CALL_MODE SetCurrentDatasetByIndex(int nIndex)=0;
+
+ ///õǰ (0x20ϰ汾֧)
+ /**
+ *@param const char *szDatasetName
+ *@return int 0 ʾɹΪʧ
+ */
+ virtual int FUNCTION_CALL_MODE SetCurrentDataset(const char *szDatasetName)=0;
+
+ /** ȡָ
+ *@return ָ
+ */
+ virtual void * FUNCTION_CALL_MODE GetPackBuf(void) = 0;
+
+ /** ȡݳ
+ *@return ݳ
+ */
+ virtual unsigned int FUNCTION_CALL_MODE GetPackLen(void) = 0;
+
+ /**ȡݼ¼,20051207Ժ汾֧
+ *@return ¼
+ */
+ virtual unsigned int FUNCTION_CALL_MODE GetRowCount(void) = 0;
+
+ ///м¼αӿڣȡ¼
+ virtual void FUNCTION_CALL_MODE First() = 0;
+
+ ///м¼αӿڣȡһ¼
+ virtual void FUNCTION_CALL_MODE Last() = 0;
+
+ ///м¼αӿڣȡĵn¼ȡֵΧ[1, GetRowCount()]
+ virtual void FUNCTION_CALL_MODE Go(int nRow) = 0;
+
+ ///ȡǰֵĽӿ,ûַ""
+ virtual const char* FUNCTION_CALL_MODE GetDatasetName() = 0;
+
+ virtual int FUNCTION_CALL_MODE OpenAndCopy(void * lpBuffer,unsigned int iLen) = 0;
+
+ //20140623 majc Ӹֻȡֶֶͣξȣֶ
+ //ȡֶ
+ /** @param columnName:ֶ
+ * @return:泣; ĬϷ'S'
+ */
+ virtual char FUNCTION_CALL_MODE GetColTypeByName(const char * columnName)=0;
+
+
+ ///ȡֶСλ
+ /** @param columnName:ֶ
+ * @return int ֶСλ 0
+ */
+ virtual int FUNCTION_CALL_MODE GetColScaleByName(const char * columnName)=0;
+
+ //ȡֶݵ.
+ /** @param columnName:ֶ
+ * @return int ֶο 1
+ */
+ virtual int FUNCTION_CALL_MODE GetColWidthByName(const char * columnName) = 0;
+};
+
+///Ӷ CConnectionInterface IJöCConfigInterface
+/**
+* ļء浽ļд
+*/
+class CConfigInterface: public IKnown
+{
+public:
+ /**
+ * ļ
+ * @param szFileName ļʽiniοʾ
+ * @return 0ʾɹʧ
+ */
+ virtual int FUNCTION_CALL_MODE Load(const char *szFileName) = 0;
+
+ /**
+ * 浽ļ
+ * @param szFileName ļ
+ * @return 0ʾɹʧ
+ */
+ virtual int FUNCTION_CALL_MODE Save(const char *szFileName) = 0;
+
+ /**
+ * ȡֵַ
+ * @param szSection
+ * @param szEntry
+ * @param szDefault ȱʡֵ
+ * @return ֵַûҵʱszDefault
+ */
+ virtual const char * FUNCTION_CALL_MODE GetString(const char *szSection, const char *szEntry, const char *szDefault) = 0;
+
+ /**
+ * ȡֵ
+ * @param szSection
+ * @param szEntry
+ * @param iDefault ȱʡֵ
+ * @return ֵûҵʱiDefault
+ */
+ virtual int FUNCTION_CALL_MODE GetInt(const char *szSection, const char *szEntry, int iDefault) = 0;
+
+ /**
+ * ֵַ
+ * @param szSection
+ * @param szEntry
+ * @param szValue ֵ
+ * @return 0ʾɹʧ
+ */
+ virtual int FUNCTION_CALL_MODE SetString(const char *szSection, const char *szEntry, const char *szValue) = 0;
+
+ /**
+ * ֵ
+ * @param szSection
+ * @param szEntry
+ * @param iValue ֵ
+ * @return 0ʾɹʧ
+ */
+ virtual int FUNCTION_CALL_MODE SetInt(const char *szSection, const char *szEntry, int iValue) = 0;
+};
+
+
+typedef struct tagBizRouteInfo
+{
+ char ospfName[ID_STR_LEN+1];//·Ŀڵм
+ char nbrName[ID_STR_LEN+1];//мڵھ
+ char svrName[SVRINSTANCE_NAME_LENGTH+1];//мĽ
+ char pluginID[PLUGIN_NAME_LENGTH+1];//м
+ int connectID;//Ӻ
+ int memberNO;//Ա
+
+ tagBizRouteInfo()
+ {
+ memset(this,0,sizeof(tagBizRouteInfo));
+ }
+}BIZROUTE_INFO;
+
+
+struct IBizMessage : public IKnown
+{
+ //ùܺ
+ virtual void FUNCTION_CALL_MODE SetFunction(const int nFUnctionNo) = 0;
+ //ȡܺ
+ virtual int FUNCTION_CALL_MODE GetFunction() = 0;
+
+ //ð
+ virtual void FUNCTION_CALL_MODE SetPacketType(const int nPacketType) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetPacketType() = 0;
+
+ //Ӫҵ
+ virtual void FUNCTION_CALL_MODE SetBranchNo(const int nBranchNo) = 0;
+ //ȡӪҵ
+ virtual int FUNCTION_CALL_MODE GetBranchNo() = 0;
+
+ //ϵͳ
+ virtual void FUNCTION_CALL_MODE SetSystemNo(const int nSystemNo) = 0;
+ //ȡϵͳ
+ virtual int FUNCTION_CALL_MODE GetSystemNo() = 0;
+
+ //ϵͳ
+ virtual void FUNCTION_CALL_MODE SetSubSystemNo(const int nSubSystemNo) = 0;
+ //ȡϵͳ
+ virtual int FUNCTION_CALL_MODE GetSubSystemNo() = 0;
+
+ //÷߱
+ virtual void FUNCTION_CALL_MODE SetSenderId(const int nSenderId) = 0;
+ //ȡ߱
+ virtual int FUNCTION_CALL_MODE GetSenderId() = 0;
+
+ //ð
+ virtual void FUNCTION_CALL_MODE SetPacketId(const int nPacketId) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetPacketId() = 0;
+
+ //Ŀĵ·
+ virtual void FUNCTION_CALL_MODE SetTargetInfo(const BIZROUTE_INFO targetInfo) = 0;
+ //ȡĿĵ·
+ virtual void FUNCTION_CALL_MODE GetTargetInfo(BIZROUTE_INFO& targetInfo) = 0;
+
+ //÷·
+ virtual void FUNCTION_CALL_MODE SetSendInfo(const BIZROUTE_INFO sendInfo) = 0;
+ //ȡ·
+ virtual void FUNCTION_CALL_MODE GetSendInfo(BIZROUTE_INFO& sendInfo) = 0;
+
+ //ô
+ virtual void FUNCTION_CALL_MODE SetErrorNo(const int nErrorNo) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetErrorNo() = 0;
+
+ //ôϢ
+ virtual void FUNCTION_CALL_MODE SetErrorInfo(const char* strErrorInfo) = 0;
+ //ȡϢ
+ virtual const char* FUNCTION_CALL_MODE GetErrorInfo() = 0;
+
+ //÷
+ virtual void FUNCTION_CALL_MODE SetReturnCode(const int nReturnCode) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetReturnCode() = 0;
+
+ //ҵ
+ virtual void FUNCTION_CALL_MODE SetContent(void* lpContent,int iLen) = 0;
+ //ȡҵ
+ virtual const void* FUNCTION_CALL_MODE GetContent(int& iLen) = 0;
+
+ //½ӿϢ1.0Ķ
+ //ö
+ virtual void FUNCTION_CALL_MODE SetIssueType(const int nIssueType) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetIssueType() = 0;
+
+ //
+ virtual void FUNCTION_CALL_MODE SetSequeceNo(const int nSequeceNo) = 0;
+ //ȡ
+ virtual int FUNCTION_CALL_MODE GetSequeceNo() = 0;
+
+ //ùؼֶϢ
+ virtual void FUNCTION_CALL_MODE SetKeyInfo(void* lpKeyData,int iLen) = 0;
+ //ȡؼֶϢ
+ virtual const void* FUNCTION_CALL_MODE GetKeyInfo(int& iLen) = 0;
+
+ //øݣʱԭ
+ virtual void FUNCTION_CALL_MODE SetAppData(const void* lpAppdata,int nAppLen) = 0;
+ //ȡݣʱԭ
+ virtual const void* FUNCTION_CALL_MODE GetAppData(int& nAppLen) = 0;
+
+ //תӦ
+ virtual int FUNCTION_CALL_MODE ChangeReq2AnsMessage() = 0;
+
+ //ȡ
+ virtual void* FUNCTION_CALL_MODE GetBuff(int& nBuffLen) = 0;
+ //
+ virtual int FUNCTION_CALL_MODE SetBuff(const void* lpBuff,int nBuffLen) = 0;
+
+ //ϢڵֶΣ´θá
+ virtual void FUNCTION_CALL_MODE ReSet() = 0;
+
+ //ù˾
+ virtual void FUNCTION_CALL_MODE SetCompanyID(const int nCompanyID) = 0;
+ //ȡ˾
+ virtual int FUNCTION_CALL_MODE GetCompanyID() = 0;
+
+ //÷߹˾
+ virtual void FUNCTION_CALL_MODE SetSenderCompanyID(const int nSenderCompanyID) = 0;
+ //ȡ߹˾
+ virtual int FUNCTION_CALL_MODE GetSenderCompanyID() = 0;
+};
+
+#define IDENTITY_NAME_LENGTH 32 /**< ͻֳ */
+#define MAX_MACADDRESS_LEN 18 /**< MAC ַ */
+#define MAX_RAND_LEN 4 /**< */
+
+/** ͻʶ */
+#define MAX_BIZNAME_LEN \
+ IDENTITY_NAME_LENGTH+1+MAX_MACADDRESS_LEN+1+MAX_RAND_LEN+2
+
+#define INIT_RECVQ_LEN 256 /**< նгʼ */
+#define STEP_RECVQ_LEN 512 /**< նչ */
+#define SIMPLIFIED_CHINESE 0 /**< Ϣ: */
+#define ENGLISH 1 /**< Ϣ:Ӣ */
+#define MAX_FILTERFIELD_LEN 63 /**< ֶγ */
+
+/** ɿȼ */
+enum ReliableLevel
+{
+ LEVEL_DOBEST = 0, /**< Ϊ */
+ LEVEL_DOBEST_BYSEQ = 1, /**< */
+ LEVEL_MEM = 2, /**< ڴ */
+ LEVEL_FILE = 3, /**< ļ */
+ LEVEL_SYSTEM = 4 /**< ϵͳ */
+};
+
+/**
+ * ӿ
+ */
+class CFilterInterface:public IKnown
+{
+public:
+ /**
+ * ±ȡ
+ * @param index Ӧű
+ * @return ضӦ±֣NULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0;
+
+ /**
+ * ±ȡֵ
+ * @param index Ӧű
+ * @return ضӦ±ֵNULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0;
+
+ /**
+ * ݹֻȡֵ
+ * @param fileName ӦĹ
+ * @return ضӦĹֵֵNULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0;
+
+ /**
+ * ȡĸ
+ * @return ضӦĸûз0
+ */
+ virtual int FUNCTION_CALL_MODE GetCount() = 0;
+
+ /**
+ * ùݹֵֺ
+ * @param filterName ӦĹ
+ * @param filterValue ӦĹֵֵ
+ */
+ virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue) =0;
+};
+
+/**
+ * IJӿ
+ */
+class CSubscribeParamInterface:public IKnown
+{
+public:
+
+ /**
+ *
+ * @param szName Ӧ
+ */
+ virtual void FUNCTION_CALL_MODE SetTopicName(char* szName) =0;
+
+ /**
+ * ø
+ * @param lpData ݵַ
+ * @param iLen ݵij
+ */
+ virtual void FUNCTION_CALL_MODE SetAppData(void* lpData,int iLen)=0;
+
+ /**
+ * ӹ
+ * @param filterName
+ * @param filterValue ֵ
+ */
+ virtual void FUNCTION_CALL_MODE SetFilter(char* filterName,char* filterValue)=0;
+
+ /**
+ * ӷֶ
+ * @param filedName Ҫӵķֶ
+ */
+ virtual void FUNCTION_CALL_MODE SetReturnFiled(char* filedName)=0;
+
+ /**
+ * Ƿȱ־
+ * @param bFromNow trueʾҪ֮ǰݣҲDzȱfalseʾҪȱ
+ */
+ virtual void FUNCTION_CALL_MODE SetFromNow(bool bFromNow)=0;
+
+ /**
+ * øǶı־
+ * @param bReplace trueʾǶģȡ֮ǰжģֻǰĶģfalseʾӶ
+ */
+ virtual void FUNCTION_CALL_MODE SetReplace(bool bReplace)=0;
+
+ /**
+ * ÷ͼ
+ * @param nSendInterval λ
+ */
+ virtual void FUNCTION_CALL_MODE SetSendInterval(int nSendInterval)=0;
+
+ /**
+ * ȡ
+ * @return Ϣ
+ */
+ virtual char* FUNCTION_CALL_MODE GetTopicName() =0;
+
+ /**
+ * ȡ
+ * @param iLen Σʾݵij
+ * @return ظַûзNULL
+ */
+ virtual void* FUNCTION_CALL_MODE GetAppData(int *iLen) =0;
+
+ /**
+ * ȡӦĹֶε
+ * @param index Ӧű
+ * @return ضӦ±֣NULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterNameByIndex(int index) = 0;
+
+ /**
+ * ±ȡֵ
+ * @param index Ӧű
+ * @return ضӦ±ֵNULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterValueByIndex(int index)= 0;
+
+ /**
+ * ݹֻȡֵ
+ * @param fileName ӦĹ
+ * @return ضӦĹֵֵNULL.
+ */
+ virtual char* FUNCTION_CALL_MODE GetFilterValue(char* fileName)= 0;
+
+ /**
+ * ȡĸ
+ * @return ضӦĸûз0
+ */
+ virtual int FUNCTION_CALL_MODE GetFilterCount() = 0;
+
+ /**
+ * ȡֶ
+ * @return ضӦķֶϢ
+ */
+ virtual char* FUNCTION_CALL_MODE GetReturnFiled()=0;
+
+ /**
+ * ȡǷȱı־
+ * @return ضӦIJȱ־
+ */
+ virtual bool FUNCTION_CALL_MODE GetFromNow()=0 ;
+
+ /**
+ * ȡǷǶĵı־
+ * @return ضӦĸǶı־
+ */
+ virtual bool FUNCTION_CALL_MODE GetReplace() =0;
+
+ /**
+ * ȡӦķƵ
+ * @return ضӦķͼ
+ */
+ virtual int FUNCTION_CALL_MODE GetSendInterval()=0;
+
+ /**
+ * ǷϢ
+ * @param bUpdate trueʾҪϢţfalseʾ
+ */
+ virtual void FUNCTION_CALL_MODE SetUpdateMsgNo(bool bUpdate)=0;
+
+ /**
+ * ȡǷϢ
+ * @return ǷϢ
+ */
+ virtual bool FUNCTION_CALL_MODE GetUpdateMsgNo()=0;
+};
+
+class CSubscribeInterface;
+
+/**
+ * @brief Ļصӿڷصݶ壬˶Ҫҵ֮⣬Ҫص
+ */
+typedef struct tagSubscribeRecvData
+{
+ char* lpFilterData; /**< ֶεͷָ룬ý */
+ int iFilterDataLen; /**< ֶεݳ */
+ char* lpAppData; /**< ݵͷָ */
+ int iAppDataLen; /**< ݵij */
+ char szTopicName[260]; /**< */
+
+ /**
+ * tagSubscribeRecvData 캯
+ */
+ tagSubscribeRecvData()
+ {
+ memset(this,0,sizeof(tagSubscribeRecvData));
+ }
+}SUBSCRIBE_RECVDATA, *LPSUBSCRIBE_RECVDATA;
+
+/**
+ * ĻصӿڣϲӦͨӿڣƹϢ
+ */
+class CSubCallbackInterface: public IKnown
+{
+public:
+
+ /**
+ * յϢĻص
+ * @param lpSub صĶָ
+ * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ
+ * @param lpData ϢĶָ룬һϢҵ
+ * @param nLength ݵij
+ * @param lpRecvData ϢֶηأҪ˸ݣϢ֣ϸοǰṹ嶨
+ * @return
+ */
+ virtual void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData) = 0;
+
+ /**
+ * յϢصһӵ˲Ե»صӿ,ص治ҪȡģײѾȡģֻһ֪ͨӿ
+ * @param lpSub صĶָ
+ * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ
+ * @param TickMsgInfo ˵ĴϢҪǰظĶλϢ
+ * @return
+ */
+ virtual void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo) = 0;
+};
+
+
+/**
+ * ĽӿڵĶ
+ */
+class CSubscribeInterface: public IKnown
+{
+public:
+
+ /**
+ *
+ * @param lpSubscribeParamInter 涨ĶIJṹ
+ * @param uiTimeout ʱʱ
+ * @param lppBizUnPack ҵУʱʧܷصҵϢijɹûзأҪReleaseͷ
+ ҵУĴϢд£
+ IF2UnPacker* lpBizUnPack =NULL;
+ SubscribeTopic(...,&lpBizUnPack);
+ ݷֵʧܵľж lpBizUnPack DzNULL.
+ Ϣȡ֮,ͷ
+ lpBizUnPack->Release();
+ * @param lpBizPack ҵУҪӵҵֶԼֵûоݹΪҵУֶ
+ * @return ֵ0ʾǰijɹĶıʶҪסʶͶ֮ӳϵʶҪȡĺͽϢĻص.
+ * ֵݴŻȡϢ.
+ */
+ virtual int FUNCTION_CALL_MODE SubscribeTopic(CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,IF2UnPacker** lppBizUnPack=NULL,IF2Packer* lpBizPack=NULL) = 0;
+
+ /**
+ * ȡ
+ * @param subscribeIndex ϢӦĶıʶʶSubscribeTopicķ
+ * @return 0ʾȡijɹֵݴŻȡϢ.
+ */
+ virtual int FUNCTION_CALL_MODE CancelSubscribeTopic(int subscribeIndex) = 0;
+
+
+ /**
+ * ȡ
+ * @param topicName
+ * @param lpFilterInterface ӦĹ
+ * @return 0ʾȡijɹֵݴŻȡϢ.
+ */
+ virtual int FUNCTION_CALL_MODE CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface) = 0;
+
+
+
+ /**
+ * ȡǰĽӿѾĵԼϢ
+ * @param lpPack 洫Ĵ
+ * @note packerֶ
+ - SubcribeIndex
+ - IsBornTopic
+ - TopicName
+ - TopicNo
+ - FilterRaw
+ - Appdata
+ - SendInterval
+ - ReturnFileds
+ - isReplace
+ - isFromNow
+ */
+ virtual void FUNCTION_CALL_MODE GetSubcribeTopic(IF2Packer* lpPack)=0;
+
+
+ /**
+ * ȡַ
+ * @param lpPort ķ˿ڣΪNULL
+ * @return طַ
+ */
+ virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0;
+ /**
+ * ȡ˵Ϣ
+ * @param byForce ǷǿƴӺ̨ȡ
+ * @param iTimeOut ʱʱ
+ * @return ɹͷϢ
+ * @note Ҫreleaseӿڽͷ.
+ * @note packerֶ
+ * - TopicName
+ * - TopicNo
+ * - ReliableLevel
+ * - IssuePriority
+ * - MsgLifetime
+ * - Stutas
+ * - TickStrategy
+ * - BusinessVerify
+ * - Local
+ * - FilterField1
+ * - FilterField2
+ * - FilterField3
+ * - FilterField4
+ * - FilterField5
+ * - FilterField6
+ * - FilterField7
+ * - FilterField8
+ * - FilterField9
+ * - FilterField10
+ * - FilterField11
+ * - FilterField12
+ * - FilterField13
+ * - FilterField14
+ * - FilterField15
+ * - FilterField16
+ * - SubscribeStr
+ * - PublishStr
+ */
+ virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0;
+
+
+ /**
+ *ĵĽӿ
+ *@param lpSubReqUnpack ļϣunpackʽ
+ *Ľֶ£
+ *TopicName SendInterval ReturnFileds isFromNow AppData
+ *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4
+ *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8
+ *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12
+ *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16
+ *BizCheckPack(ڶӦҵУunpackƸʽ)
+ *@param lpSubAnsPacker ĽķأⲿһյĴڲÿĽ
+ *Ĵֶ£
+ *TopicName SendInterval ReturnFileds isFromNow AppData
+ *FilterField1 FilterValue1 FilterField2 FilterValue2 FilterField3 FilterValue3 FilterField4 FilterValue4
+ *FilterField5 FilterValue5 FilterField6 FilterValue6 FilterField7 FilterValue7 FilterField8 FilterValue8
+ *FilterField9 FilterValue9 FilterField10 FilterValue10 FilterField11 FilterValue11 FilterField12 FilterValue12
+ *FilterField13 FilterValue13 FilterField14 FilterValue14 FilterField15 FilterValue15 FilterField16 FilterValue16
+ *BizCheckPack SubscribeIndex NotifyStatus ErrorNo ErrorInfo
+ *@param uiTimeout ĵijʱʱ,λ
+ *@return ɹͷ0ֵʾʧܣͨŻȡϢÿĵʧԭԲ鿴lpSubAnsPackerݡ
+ //////////////////////////////////////////////////////////////////////////////
+ *ʵ
+ *IF2Packer* lpSubReqPack =NewPacker(2);
+ *lpSubReqPack->AddRef();
+ *ӶҪĵIJղ˵ӡ
+ *IF2Packer* lpSubAnsPack =NewPacker(2);
+ *lpSubAnsPack->AddRef();
+ *lpSubAnsPack->BeginPack();
+ *BatchSubscribeTopic(lpSubReqPack->Unpack(),lpSubAnsPack,10000);
+ *lpSubAnsPack->EndPack();
+ *IF2UnPacker* lpAnsUnPack=lpSubAnsPack->Unpack();
+ *ݷزȡӦĶӦ
+ *lpSubReqPack->FreeMem(lpSubReqPack->GetPackBuf());
+ *lpSubReqPack->Release();
+ *lpSubAnsPack->FreeMem(lpSubAnsPack->GetPackBuf());
+ *lpSubAnsPack->Release();
+ //////////////////////////////////////////////////////////////////////////////
+ */
+ virtual int FUNCTION_CALL_MODE BatchSubscribeTopic(IF2UnPacker* lpSubReqUnpack,IF2Packer* lpSubAnsPacker,unsigned int uiTimeout) = 0;
+
+ /**
+ * ȡĻỰ״̬
+ * @return 0 ϢӶϿ
+ 1 ϢĽ
+ 2 Ϣѽ
+ */
+ virtual int FUNCTION_CALL_MODE GetSessionStatus() = 0;
+};
+
+/**
+ * ӿ
+ */
+class CPublishInterface: public IKnown
+{
+public:
+
+ /**
+ * ҵʽݷӿ
+ * @param topicName ֣֪־ʹNULL
+ * @param lpUnPacker
+ * @param iTimeOut ʱʱ
+ * @param lppBizUnPack ҵУʱʧܷصҵϢɹûзأҪReleaseͷ
+ ҵУĴϢд£
+ IF2UnPacker* lpBizUnPack =NULL;
+ PubMsgByPacker(...,&lpBizUnPack);
+ ݷֵʧܵľж lpBizUnPack DzNULL.
+ Ϣȡ֮,ͷ
+ lpBizUnPack->Release();
+ * @param bAddTimeStamp Ƿʱϵܲ
+ * @return 0ʾɹֵݴŻȡϢ.
+ */
+ virtual int FUNCTION_CALL_MODE PubMsgByPacker(char* topicName ,IF2UnPacker* lpUnPacker,int iTimeOut=-1,
+ IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0;
+
+ /**
+ * ҵʽݷӿڣһƸʽķ
+ * @param topicName ֣֪־ʹNULL
+ * @param lpFilterInterface ҪϲԼָĬûй
+ * @param lpData
+ * @param nLength ݳ
+ * @param iTimeOut ʱʱ
+ * @param lppBizUnPack ҵУʱʧܷصҵϢɹûзأҪReleaseͷ
+ ҵУĴϢд£
+ IF2UnPacker* lpBizUnPack =NULL;
+ PubMsgByPacker(...,&lpBizUnPack);
+ ݷֵʧܵľж lpBizUnPack DzNULL.
+ Ϣȡ֮,ͷ
+ lpBizUnPack->Release();
+ * @param bAddTimeStamp Ƿʱϵܲ
+ * @return 0ʾɹֵݴŻȡϢ.
+ */
+ virtual int FUNCTION_CALL_MODE PubMsg(char* topicName, CFilterInterface* lpFilterInterface, const void *lpData, int nLength,int iTimeOut=-1,
+ IF2UnPacker** lppBizUnPack=NULL,bool bAddTimeStamp=false) = 0;
+
+ /**
+ * صǰķ
+ * @param topicName
+ * @return 0ʾûжӦ⣬ֵʾɹ
+ */
+ virtual uint32 FUNCTION_CALL_MODE GetMsgNoByTopicName(char* topicName)=0;
+
+ /**
+ * ȡַ
+ * @param lpPort ķ˿ڣΪNULL
+ * @return طַ
+ */
+ virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0;
+};
+/**
+ * ļ»صӿ
+ */
+class CFileUpdateCallbackInterface: public IKnown
+{
+public:
+
+ /**
+ * յļбĻص
+ * @param lpData ضָ
+ * @param nLength ݵijȣΪΪ
+ * @param lpErrorInfo ΪNULLΪϢӦȥϢûȥôϢ
+ * @return
+ */
+ virtual void FUNCTION_CALL_MODE OnRecvFileList(const void *lpData, int nLength, const char * lpErrorInfo) = 0;
+
+ /**
+ * յ֪ͨļ½
+ * @param iOneFileProcessBar ǰļ
+ * @param iTotalProcessBar ܽ
+ * @param lpErrorInfo ΪNULLΪϢӦȥϢûȥôϢ
+ * @return
+ */
+ virtual void FUNCTION_CALL_MODE OnShowProcessBar(int iOneFileProcessBar, int iTotalProcessBar, const char * lpErrorInfo) = 0;
+
+ /**
+ * յɹȡļ
+ * @return
+ */
+ virtual void FUNCTION_CALL_MODE OnCancel() = 0;
+
+
+};
+/**
+ * ļ½ӿ
+ */
+class CFileUpdateInterface: public IKnown
+{
+public:
+
+ /**
+ * ǰصʾļбûѡ·Ҫµļб
+ * @param lpPack ļбָ
+ * @return 0ʾɹֵʾʧ.
+ */
+ virtual int FUNCTION_CALL_MODE UpdateFile(IF2Packer* lpPack) = 0;
+
+ /**
+ * ȡڸеĸ¶
+ * @return 0ʾɹֵʾʧ
+ */
+ virtual int FUNCTION_CALL_MODE CancelUpdateFile() = 0;
+
+ /**
+ * ȡļб
+ * @return ļбⲿֻܶͷ
+ * @note ֶμļdefineֶ,ע⣺OnRecvFileListصԺ÷Ч
+ */
+ virtual IF2UnPacker* FUNCTION_CALL_MODE GetFileUpdateList() = 0;
+};
+class CConnectionInterface;
+
+///Ӷ CConnectionInterface ҪĻصӿڶ
+/**
+* ӳɹӶϿɡյݵ¼
+*/
+class CCallbackInterface: public IKnown
+{
+public:
+ /**
+ * ӳɹ
+ * @param lpConnection ¼Ӷ
+ */
+ virtual void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection) = 0;
+
+ /**
+ * ɰȫ
+ * @param lpConnection ¼Ӷ
+ */
+ virtual void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection) = 0;
+
+ /**
+ * ע
+ * @param lpConnection ¼Ӷ
+ */
+ virtual void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection) = 0;
+
+ /**
+ * ӱϿ
+ * @param lpConnection ¼Ӷ
+ */
+ virtual void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection) = 0;
+
+ /**
+ *
+ * @param lpConnection ¼Ӷ
+ * @param hSend ;
+ * @param reserved1 ֶ
+ * @param reserved2 ֶ
+ * @param nQueuingData Ͷʣʹ߿ôֵƷ͵ٶȣСijֵʱз
+ * @see Send()
+ */
+ virtual void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData) = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d) = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d) = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved3() = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved4() = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved5() = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved6() = 0;
+
+ virtual void FUNCTION_CALL_MODE Reserved7() = 0;
+
+ /**
+ * յSendBiz첽͵Ӧ
+ * @param lpConnection ¼Ӷ
+ * @param hSend ;
+ * @param lpUnPackerOrStr ָָߴϢ
+ * @param nResult հ
+ * nResult0ʾҵݽճɹҵɹlpUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * nResult1ʾҵݽճɹҵʧˣlpUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * nResult2ʾյҵϢlpUnPackerOrStrָһɶַϢ
+ * nResult3ʾҵʧܡlpUnPackerOrStrָNULL
+ * nResult4ʾҵΪաlpUnpackerOrStrָNULLlpRetDataⲿֽ
+ */
+ virtual void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult) = 0;
+
+ /**
+ * յSendBiz첽͵Ӧ
+ * @param lpConnection ¼Ӷ
+ * @param hSend ;
+ * @param lpRetData ҪصӦݣҪȡ
+ * @param lpUnPackerOrStr ָָߴϢ
+ * @param nResult հ
+ * nResult0ʾҵݽճɹҵɹlpUnpackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * nResult1ʾҵݽճɹҵʧˣlpUnpackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * nResult2ʾյҵϢlpUnpackerOrStrָһɶַϢ
+ * nResult3ʾҵʧܡlpUnpackerOrStrָNULL
+ * nResult4ʾҵΪաlpUnpackerOrStrָNULLlpRetDataⲿֽ
+ */
+ virtual void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult) = 0;
+ //20130624 xuxp صBizMessageӿ
+ /**
+ * յʱָReplyCallbackѡӦûжӦ
+ * @param lpConnection ¼Ӷ
+ * @param hSend ;
+ * @param lpMsg ҵϢָ
+ */
+ virtual void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg) = 0;
+
+ //20150709 majc ӻص
+ ~CCallbackInterface(){}
+
+};
+
+///T2_SDKӶӿ
+/**
+* ӵĶ̲߳ȫͬʱһǹһ߳ãҪ߳ʹã
+* ӡϿ͡յ
+*/
+class CConnectionInterface: public IKnown
+{
+public:
+ ///״̬
+ enum ConnectionStatus
+ {
+ Disconnected = 0x0000, /**< δ */
+ Connecting = 0x0001, /**< socket */
+ Connected = 0x0002, /**< socket */
+ SafeConnecting = 0x0004, /**< ڽȫ */
+ SafeConnected = 0x0008, /**< ѽȫ */
+ Registering = 0x0010, /**< ע */
+ Registered = 0x0020, /**< ע */
+ Rejected = 0x0040 /**< ܾر */
+ };
+
+ ///ѡϣ0ʾճʱʱɾIDԿٴεRecvBizԽգ
+ enum RecvFlags
+ {
+ JustRemoveHandle = 0x0001 /**< ճʱʱpacket_idɾ */
+ };
+
+ /**
+ * ʼӶ
+ * @param lpCallback ص
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ * ӦòҪκλص÷NULLԶصͶ
+ */
+ virtual int FUNCTION_CALL_MODE Create(CCallbackInterface *lpCallback) = 0;
+
+ /**
+ * ʼ/ע
+ * @param uiTimeout ʱʱ䣬λ룬0ʾȴʹôӷʱòã
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE Connect(unsigned int uiTimeout) = 0;
+
+ /**
+ * Ͽ
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE Close() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved1() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved2() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved3() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved4() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved5() = 0;
+
+ virtual int FUNCTION_CALL_MODE Reserved6() = 0;
+
+ /**
+ * ȡַ
+ * @param lpPort ķ˿ڣΪNULL
+ * @return طַ
+ */
+ virtual const char * FUNCTION_CALL_MODE GetServerAddress(int *lpPort) = 0;
+
+ /**
+ * ȡ״̬
+ * @return ״̬
+ */
+ virtual int FUNCTION_CALL_MODE GetStatus() = 0;
+
+ /**
+ * ȡأʹ߿ͬʱʵͬʱӲͬķӵʱԼؾʹĸ
+ * @return طأǸԽʾԽæʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE GetServerLoad() = 0;
+
+ /**
+ * ȡӦĴϢĿǰּ֧ĺӢģ֧ԿͨӶerrormsg
+ * @param nErrorCode
+ * @return شϢ
+ */
+ virtual const char * FUNCTION_CALL_MODE GetErrorMsg(int nErrorCode) = 0;
+
+ /**
+ * ȡӴţעʱȿͨConnectķֵȡţ
+ * ҲͨñȡţȻøôŵGetErrorMsgɻȡɶĴϢ
+ * @return Ӵ
+ */
+ virtual int FUNCTION_CALL_MODE GetConnectError() = 0;
+
+ /**
+ * ҵ
+ * @param iFunID ܺ
+ * @param lpPacker ָ
+ * @param nAsy 0ʾͬʾ첽
+ * @param iSystemNo iSystemNo > 0ϵͳ
+ * @param nCompressID ҵѹѹ㷨IDĿǰֻ֧ID = 1ѹ㷨
+ * ID = 0ʾѹע⣬ѹֻSDK飬ǷѹȡڰʵʴС
+ * ͬ͵İͨRecvBizգ첽͵İյӦԶصOnReceivedBiz
+ * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE SendBiz(int iFunID, IF2Packer *lpPacker, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1) = 0;
+
+ /**
+ * ҵ
+ * @param hSend ;SendBizijɹֵ
+ * @param lppUnPackerOrStr ֵ0ʾҵݽճɹҵɹ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * ֵ1ʾҵݽճɹҵʧˣ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * ֵ2ʾյҵϢ*lppUnPackerOrStrָһɶַϢ
+ * ֵ3ʾҵʧܡ*lppUnPackerOrStrԭָݲᱻı䡣
+ * @param uiTimeout ʱʱ䣬λ롣
+ * @param uiFlag ѡ0ʾճʱԿɼRecvBizգ
+ * JustRemoveHandleʾճʱhSendɾ
+ * @return С0ʾRecvBizʧܣͨGetErrorMsgԻȡϸϢ
+ * ע⣡ⲿָָĽڴSDKڲⲿͷţ
+ * ע⣡lppUnPackerOrStrӦĽʱģϲ㲻Իָ룬ٴεӵRecvBizָָݾͻı
+ * ҪҪýGetPackBufƿȥ߳Ҫٽ
+ */
+ virtual int FUNCTION_CALL_MODE RecvBiz(int hSend, void **lppUnPackerOrStr, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0;
+
+ //20101228 xuxp ͺͽܵӿںڶĺ
+ /**
+ * ҵ
+ * @param iFunID ܺ
+ * @param lpPacker ָ
+ * @param svrName ָмĽڵ
+ * @param nAsy 0ʾͬʾ첽
+ * @param iSystemNo iSystemNo > 0ϵͳ
+ * @param nCompressID ҵѹѹ㷨IDĿǰֻ֧ID = 1ѹ㷨
+ * ID = 0ʾѹע⣬ѹֻSDK飬ǷѹȡڰʵʴС
+ * ͬ͵İͨRecvBizExգ첽͵İյӦԶصOnReceivedBizEx
+ * @param branchNo Ӫҵš
+ * @param lpRequest ݣݽṹ嶨帳ֵ
+ * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE SendBizEx(int iFunID, IF2Packer *lpPacker,char* svrName, int nAsy = 0, int iSystemNo = 0, int nCompressID = 1,int branchNo=0,LPREQ_DATA lpRequest=NULL) = 0;
+
+ /**
+ * ҵ
+ * @param hSend ;SendBizijɹֵ
+ * @param lppUnPackerOrStr ֵ0ʾҵݽճɹҵɹ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * ֵ1ʾҵݽճɹҵʧˣ*lppUnPackerOrStrָһʱӦȽָתΪIF2UnPacker *
+ * ֵ2ʾյҵϢ*lppUnPackerOrStrָһɶַϢ
+ * ֵ3ʾҵʧܡ*lppUnPackerOrStrԭָݲᱻı䡣
+ * @param lpRetData ҪصӦݣҪȡ
+ * @param uiTimeout ʱʱ䣬λ룬0ʾȴ
+ * @param uiFlag ѡ0ʾճʱԿɼRecvBizգ
+ * JustRemoveHandleʾճʱhSendɾ
+ * @return С0ʾRecvBizExʧܣͨGetErrorMsgԻȡϸϢ
+ * ע⣡ⲿָָĽڴSDKڲⲿͷţ
+ * ע⣡ⲿָָLPRET_DATAڴSDKڲⲿͷţ
+ * ע⣡lppUnPackerOrStrӦĽLPRET_DATAʱģϲ㲻Իָ룬ٴεӵRecvBizExָָݾͻı
+ * ҪҪýGetPackBufƿȥ߳Ҫٽ
+ * LPRET_DATAҪṹ帴
+ */
+ virtual int FUNCTION_CALL_MODE RecvBizEx(int hSend, void **lppUnpackerOrStr, LPRET_DATA* lpRetData, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0;
+
+
+ //20101228 xuxp Create֤صµOnReceivedBizExĽӿ
+ /**
+ * ʼӶ
+ * @param lpCallback ص
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ * ӦòҪκλص÷NULLԶصͶ
+ */
+ virtual int FUNCTION_CALL_MODE CreateEx(CCallbackInterface *lpCallback) = 0;
+
+
+ //20120111 dongpf GetRealAddressȡԼipַͶ˿
+ /**
+ * ȡipַͶ˿
+ * @return ȡipַͶ˿ڣʽipַ+˿
+ */
+ virtual const char* FUNCTION_CALL_MODE GetRealAddress() = 0;
+
+
+ virtual int FUNCTION_CALL_MODE Reserved8() = 0;
+ virtual int FUNCTION_CALL_MODE Reserved9() = 0;
+
+ //20130527 xuxp GetSelfAddressȡԼصIPͶ˿
+ /**
+ * ȡipַͶ˿
+ * @return ȡipַͶ˿ڣʽipַ+˿
+ */
+ virtual const char* FUNCTION_CALL_MODE GetSelfAddress() = 0;
+
+ //20130529 xuxp GetSelfMacȡԼʹõMAC
+ /**
+ * ȡMACַ
+ * @return MACĵַַʽơD067E5556D83,мûзָ
+ */
+ virtual const char* FUNCTION_CALL_MODE GetSelfMac() = 0;
+
+ //20130609 xuxp ķӿ
+ ///////////////////////////////////ӶķĽӿ///////////////////////////////////////
+
+ /**
+ * һ
+ * @param lpCallback صӿ
+ * @param SubScribeName ֣ඩߵֱ벻һͬ.32ֽ
+ * @param iTimeOut ʱʱ
+ * @param iInitRecvQLen ʼնеij
+ * @param iStepRecvQLen ܶеչ
+ * @return ضĽӿʵһỰӿڶӦһص.
+ */
+ virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,int iTimeOut,
+ int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0;
+
+ /**
+ * ȡ
+ * @param PublishName ҵ
+ * @param msgCount ػϢĸ
+ * @param iTimeOut ʼʱijʱʱ
+ * @param bResetNo Ƿ
+ * @return طͽӿʵضӦָ
+ */
+ //virtual CPublishInterface* FUNCTION_CALL_MODE GetPublisher(int msgCount,int iTimeOut,bool bResetNo = false) = 0;
+ virtual CPublishInterface* FUNCTION_CALL_MODE NewPublisher(char* PublishName,int msgCount,int iTimeOut,bool bResetNo = false) = 0;
+
+
+
+
+ /**
+ * ȡ˵Ϣ
+ * @param byForce ǷǿƴӺ̨ȡ
+ * @param iTimeOut ʱʱ
+ * @return ɹͷϢ
+ * @note Ҫreleaseӿڽͷ.
+ * @note packerֶ
+ * - TopicName
+ * - TopicNo
+ * - ReliableLevel
+ * - IssuePriority
+ * - MsgLifetime
+ * - Stutas
+ * - TickStrategy
+ * - BusinessVerify
+ * - Local
+ * - FilterField1
+ * - FilterField2
+ * - FilterField3
+ * - FilterField4
+ * - FilterField5
+ * - FilterField6
+ * - FilterField7
+ * - FilterField8
+ * - FilterField9
+ * - FilterField10
+ * - FilterField11
+ * - FilterField12
+ * - FilterField13
+ * - FilterField14
+ * - FilterField15
+ * - FilterField16
+ * - SubscribeStr
+ * - PublishStr
+
+ */
+ virtual IF2UnPacker* FUNCTION_CALL_MODE GetTopic(bool byForce,int iTimeOut) = 0;
+
+ /**
+ * ȡķ
+ */
+ virtual const char* FUNCTION_CALL_MODE GetMCLastError() = 0;
+ ////////////////////////////////////////////////////////////////////////////////
+
+ //20130624 xuxp ӽӿӿڣΪ˵Ľӿڣͻ˿ҲƼʹ
+ ///////////////////////////////////µһײӿ///////////////////////////////////////
+ /**
+ * ʼӶ
+ * @param lpCallback ص
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ * ӦòҪκλص÷NULLԶصͶ
+ */
+ virtual int FUNCTION_CALL_MODE Create2BizMsg(CCallbackInterface *lpCallback) = 0;
+
+ /**
+ * ҵ
+ * @param lpMsg ҵϢӿָ
+ * @param nAsy 0ʾͬʾ첽
+ * ͬ͵İͨRecvBizMsgգ첽͵İյӦԶصOnReceivedBizMsg
+ * @return ط;ʾʧܣͨGetErrorMsgԻȡϸϢ
+ */
+ virtual int FUNCTION_CALL_MODE SendBizMsg(IBizMessage* lpMsg,int nAsy = 0) = 0;
+
+ /**
+ *
+ * @param hSend ;
+ * @param lpMsg յҵϢָĵַ
+ * @param uiTimeout ʱʱ䣬λ룬0ʾȴ
+ * @param uiFlag ѡ0ʾճʱԿɼReceiveգ
+ * JustRemoveHandleʾճʱʱpacket_idɾԺյ첽ķʽյ
+ * @return 0ʾɹʾʧܣͨGetErrorMsgԻȡϸϢ
+ * ע⣡ⲿָָIBizMessageڴSDKڲⲿͷţ
+ * ע⣡lpMsgӦϢָʱģϲ㲻Իָ룬ٴεӵRecvBizMsgָָݾͻı
+ * ҪҪIBizMessageGetBuffƿȥ߳ҪٵSetBuff
+ */
+ virtual int FUNCTION_CALL_MODE RecvBizMsg(int hSend, IBizMessage** lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0) = 0;
+
+ //20141117 majc ļĿ¼ֶ
+ /**
+ * ȡļ,һֻһļ£ھͷ֮ǰĽӿ
+ * @param szTopicName ļ⣬ڷϢļ
+ * @param lpCallBack صӿ
+ * @param szScanDir ɨļĿ¼
+ * @param szUpdateDir ļ´ŸĿ¼
+ * @param iTimeOut ʱʱ
+ * @param szDirFilter Ŀ¼жĿ¼;Ÿ
+ * @return ļ½ӿָ
+ */
+ virtual CFileUpdateInterface* FUNCTION_CALL_MODE NewFileUpdate(const char* szTopicName,CFileUpdateCallbackInterface* lpCallBack ,const char* szScanDir,const char* szUpdateDir,unsigned int uiTimeOut = 5000, const char * szDirFilter = NULL) = 0;
+
+ /**
+ * ȡļµ
+ */
+ virtual const char* FUNCTION_CALL_MODE GetFileUpdateLastError() = 0;
+
+ //20140618 majc ӻȡһӦϸϢӿ
+ /**
+ * ȡشϢϸϢ
+ * @param bAsyError 0ʾͬ(Ĭ)ʾ첽
+ * @return ϸϢ
+ * @note ϢʽpackType:xxx;funtionId:xxx;branchNo:zxx;systemNo:xxx;subSystemNO:xxx;packId:xxx;routerInfo:xxx,xxx,xxx,xxx,xxx,xxx;sendPath:xxx,xxx,xxx,xxx,xxx,xxx;returnCode:xxx;errorNo:xxx;errorInfo:xxx
+ * packType-
+ * funtionId-ܺ
+ * branchNo-֧
+ * systemNo-ϵͳ
+ * subSystemNO-ϵͳ
+ * packId-
+ * routerInfo-Ŀ·
+ * sendPath-·
+ * returnCode-ش
+ * errorNo-
+ * errorInfo-Ϣ
+ * ˵1ͬʱReceiveصlppDataESBMessageRetuenCodeΪ0ʱãRecvBizRecvBizExڷֵΪ1234ʱãRecvBizMsgGetReturnCode()Ϊ0ʱ
+ * 2첽ʱصOnReceivedlpDataESBMessageRetuenCodeΪ0ʱãصOnReceivedBizOnReceivedBizExnResultΪ1234ʱãصOnReceivedBizMsglpMsgGetReturnCode()Ϊ0ʱ
+ */
+ virtual const char * FUNCTION_CALL_MODE GetLastAnsError(bool bAsyError = 0) = 0;
+
+ ////////////////////////////////////////////////////////////////////////////////
+ //20150209 majc Ľӿ
+ /**
+ * һ
+ * @param lpCallback صӿ
+ * @param SubScribeName ֣ඩߵֱ벻һͬ.32ֽ
+ * @param subRoterInfo ʱָ·
+ * @param iTimeOut ʱʱ
+ * @param iInitRecvQLen ʼնеij
+ * @param iStepRecvQLen ܶеչ
+ * @return ضĽӿʵһỰӿڶӦһص.
+ */
+ virtual CSubscribeInterface* FUNCTION_CALL_MODE NewSubscriberEx(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut,
+ int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0;
+ //20150514 majc user_token
+ virtual void FUNCTION_CALL_MODE SetUserToken(const char* szUserToken) = 0;
+ ////////////////////////////////////////////////////////////////////////////////
+
+ //20150610 xuxp ȺߴĽӿ
+ /**
+ * һȺ
+ * @param lpCallback صӿ
+ * @param SubScribeName ֣ඩߵֱ벻һͬ.32ֽ
+ * @param iTimeOut ʱʱ
+ * @param iInitRecvQLen ʼնеij
+ * @param iStepRecvQLen ܶеչ
+ * @return ضĽӿʵһỰӿڶӦһص.
+ */
+ virtual CSubscribeInterface* FUNCTION_CALL_MODE NewClusterSubscriber(CSubCallbackInterface *lpCallback,char* SubScribeName,SUB_ROUTER_INFO &subRoterInfo,int iTimeOut,
+ int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN) = 0;
+
+ ///20150812 liuzl ӵķĽڵ,ar#0,֧F5
+ ///20160614 zhouwh Ľӿڶ壬FUNCTION_CALL_MODE
+ //virtual const char *GetServerNodeName() = 0;
+ virtual const char * FUNCTION_CALL_MODE GetServerNodeName() = 0;
+
+ //20160614 zhouwh ͬģʽĶл
+ // note: ģʽ£ýӿڱãڴй¶
+ /**
+ @param lpData ͬreceiveʱصָ
+ */
+ virtual void FUNCTION_CALL_MODE RecycleDataBuf(void *lpData) = 0;
+
+ //20161028 majc ӽӿΨһǰ
+ /**
+ * @param lpPrefix Ψһǰ֧255ֽ
+ */
+ virtual void FUNCTION_CALL_MODE SetUniquePrefix(const char* lpPrefix) = 0;
+
+ //20161223 huxb Ͽӽӿ
+ /**
+ * @param bSafe ǷΪȫֹͣĬΪǰȫֹͣ
+ * @param uiTimeout ȫֹͣʱʱ䣬λΪms
+ */
+ virtual int FUNCTION_CALL_MODE ActiveClose(bool bSafe = false, unsigned int uiTimeout = 5000) = 0;
+
+ //20161223 huxb ÷ַӿ
+ //ע뵥̵߳
+ /**
+ * @param szServers µķַ
+ */
+ virtual int FUNCTION_CALL_MODE SetServers(const char * szServers) = 0;
+};
+
+extern "C"
+{
+ /**
+ * ȡT2_SDKİ汾
+ * @return ǰT2_SDKİ汾
+ * Ʃ磺汾Ϊ0x10000002ʾ1.0.0.2
+ */
+ int FUNCTION_CALL_MODE GetVersionInfo();
+
+ /**
+ * ȡһʵCConfigInterfaceӿڵָ
+ * @return ʵCConfigInterfaceӿڵָ
+ */
+CConfigInterface* FUNCTION_CALL_MODE NewConfig();
+
+ /**
+ * ȡһʵCConnectionInterfaceӿڵָ
+ * @param CConfigInterface ʵCConfigInterfaceӿڵָ
+ * @returnʵCConnectionInterfaceӿڵָ
+ */
+CConnectionInterface* FUNCTION_CALL_MODE NewConnection(CConfigInterface *lpConfig);
+
+/**
+* @param int iVersion ҵʽ汾(ȡֵ:1 ִ,ֵ 0x20)
+* Ƽʹ0x20
+* @return IPacker * ӿָ
+*/
+IF2Packer * FUNCTION_CALL_MODE NewPacker(int iVersion);
+
+/**
+* @param void * lpBuffer ҪݣARͨŰͷ
+* @param unsigned int iLen ݳ
+* @return IUnPacker * 汾2ӿָ
+*/
+IF2UnPacker * FUNCTION_CALL_MODE NewUnPacker(void * lpBuffer, unsigned int iLen);
+
+/**
+* @param void * lpBuffer ҪݣARͨŰͷ
+* @param unsigned int iLen ݳ
+* @return IUnPacker * 汾1ӿָ
+*/
+IF2UnPacker * FUNCTION_CALL_MODE NewUnPackerV1(void * lpBuffer, unsigned int iLen);
+
+/**
+* @param void * lpBuffer ҪݣARͨŰͷ
+* @return 1ʾ汾1Ľݣ0x21~0x2F 汾2Ľ
+*/
+int FUNCTION_CALL_MODE GetPackVersion(const void *lpBuffer);
+/**
+* @param char *EncodePass ɢнַȲ16'\0'
+* @param const char* Password Ĵɢе
+* @param int nReserve Ĭֵ
+* @return char * ɢнַͬEncodePass
+*/
+char * FUNCTION_CALL_MODE Encode(char *EncodePass, const char* Password, int nReserve = 0 );
+
+
+/**
+*һṩļܺм
+* @param const char* pIn Ĵַܵ
+* @param const char* pOut ȺʹַСһⲿ
+* @return
+*/
+int FUNCTION_CALL_MODE EncodeEx(const char *pIn, char *pOut);
+
+
+/**
+* һӿָ
+* @return NULLʾʧ.
+*/
+CFilterInterface* FUNCTION_CALL_MODE NewFilter();
+
+/**
+* һԽӿָ
+* @return NULLʾʧ.
+*/
+CSubscribeParamInterface* FUNCTION_CALL_MODE NewSubscribeParam();
+
+//20130625 xuxp ҵϢ
+IBizMessage* FUNCTION_CALL_MODE NewBizMessage();
+
+//20160317 zhouwh ҵϢѹ־
+IBizMessage* FUNCTION_CALL_MODE NewBizMessageEx(int nCompressID = 1);
+
+//20161027 majc ٶ˿
+/**
+*lpRequestֶΣaddress port
+*lpResult ֶΣɹconn_count net_delay net_speed last_error ʧܣerror_no error_info
+*uiTimeOutʱʱ
+* ֵ0 ɹ0ʧ
+*/
+int FUNCTION_CALL_MODE GetMultiNetWorkSpeed(IF2UnPacker * lpRequest, IF2Packer * lpResult, unsigned int uiTimeOut);
+}
+
+#endif
diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp
new file mode 100644
index 0000000000..0ae1e2f968
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.cpp
@@ -0,0 +1,1479 @@
+#include "ufx_interface.h"
+
+CRITICAL_SECTION* g_MsgQueueSection = NULL;
+int iTreadNum = 0;
+int GetThreadNum()
+{
+ if(g_MsgQueueSection == NULL)
+ {
+ g_MsgQueueSection = new CRITICAL_SECTION;
+ InitializeCriticalSection(g_MsgQueueSection);
+ }
+ EnterCriticalSection(g_MsgQueueSection);
+ iTreadNum++;
+ LeaveCriticalSection(g_MsgQueueSection);
+ return iTreadNum;
+}
+
+c_IF2Packer::c_IF2Packer()
+{
+ lpPacker = NewPacker(2);
+ lpPacker->AddRef();
+}
+
+c_IF2Packer::~c_IF2Packer()
+{
+
+}
+
+void c_IF2Packer::SetBuffer(char* pBuf,int iBufSize,int iDataLen)
+{
+ lpPacker->SetBuffer(pBuf,iBufSize,iDataLen);
+}
+
+void c_IF2Packer::BeginPack(void)
+{
+ lpPacker->BeginPack();
+}
+
+int c_IF2Packer::NewDataset(char *szDatasetName, int iReturnCode )
+{
+ return lpPacker->NewDataset(szDatasetName,iReturnCode);
+}
+
+int c_IF2Packer::AddField(char *szFieldName,char cFieldType,int iFieldWidth,int iFieldScale)
+{
+ return lpPacker->AddField(szFieldName,cFieldType,iFieldWidth,iFieldScale);
+}
+
+int c_IF2Packer::AddStr(char *szValue)
+{
+ return lpPacker->AddStr(szValue);
+}
+
+int c_IF2Packer::AddInt(int iValue)
+{
+ return lpPacker->AddInt(iValue);
+}
+
+int c_IF2Packer::AddDouble(double fValue)
+{
+ return lpPacker->AddDouble(fValue);
+}
+
+int c_IF2Packer::AddChar(char* cValue)
+{
+ return lpPacker->AddDouble(cValue[0]);
+}
+
+int c_IF2Packer::AddRaw(char* lpBuff,int iLen)
+{
+ return lpPacker->AddRaw(lpBuff,iLen);
+}
+
+void c_IF2Packer::EndPack()
+{
+ lpPacker->EndPack();
+}
+
+int* c_IF2Packer::GetPackBuf(void)
+{
+ char* lpBuff = (char*)(lpPacker->GetPackBuf());
+ int iLength = lpPacker->GetPackLen();
+ int* sValue = new int[iLength];
+ for(int i=0;iGetPackLen();
+}
+
+int c_IF2Packer::GetPackBufSize(void)
+{
+ return lpPacker->GetPackBufSize();
+}
+
+int c_IF2Packer::GetVersion(void)
+{
+ return lpPacker->GetVersion();
+}
+
+void c_IF2Packer::SetReturnCode(long dwRetCode)
+{
+ return lpPacker->SetReturnCode(dwRetCode);
+}
+
+c_IF2UnPacker* c_IF2Packer::UnPack(void)
+{
+ IF2UnPacker* lpUnpacker = lpPacker->UnPack();
+ c_IF2UnPacker* lpcUnpacker = new c_IF2UnPacker(lpUnpacker);
+ return lpcUnpacker;
+
+}
+
+void c_IF2Packer::FreeMem()
+{
+ void* lpBuff = lpPacker->GetPackBuf();
+ return lpPacker->FreeMem(lpBuff);
+}
+
+void c_IF2Packer::ClearValue()
+{
+ return lpPacker->ClearValue();
+}
+
+void c_IF2Packer::BeginPackEx(char* szName)
+{
+ return lpPacker->BeginPackEx(szName);
+}
+
+void c_IF2Packer::ClearDataSet()
+{
+ return lpPacker->ClearDataSet();
+}
+
+IF2Packer* c_IF2Packer::GetInstance()
+{
+ return lpPacker;
+}
+
+void c_IF2Packer::Release()
+{
+ lpPacker->Release();
+}
+
+c_IF2UnPacker::c_IF2UnPacker(char* lpBuffer,int iLen)
+{
+ //printf("ʼ,%d\n",iLen);
+ lpBuf = malloc(iLen);
+ memcpy(lpBuf,(void*)lpBuffer,iLen);
+ lpUnPacker = NewUnPacker(lpBuf,iLen);
+ if(lpUnPacker == NULL)
+ printf("ʼʧ,%d\n",iLen);
+ lpUnPacker->AddRef();
+ bRelease = true;
+}
+
+c_IF2UnPacker::c_IF2UnPacker(IF2UnPacker* lpUnPack)
+{
+ lpBuf = NULL;
+ lpUnPacker = lpUnPack;
+ bRelease = false;
+}
+
+c_IF2UnPacker::~c_IF2UnPacker()
+{
+
+}
+
+int c_IF2UnPacker::GetVersion(void)
+{
+ return lpUnPacker->GetVersion();
+}
+
+int c_IF2UnPacker::Open(char* lpBuffer,int iLen)
+{
+ return lpUnPacker->OpenAndCopy(lpBuffer,iLen);
+}
+
+int c_IF2UnPacker::GetDatasetCount()
+{
+ return lpUnPacker->GetDatasetCount();
+}
+
+int c_IF2UnPacker::SetCurrentDatasetByIndex(int nIndex)
+{
+ return lpUnPacker->SetCurrentDatasetByIndex(nIndex);
+}
+
+int c_IF2UnPacker::SetCurrentDataset(char *szDatasetName)
+{
+ return lpUnPacker->SetCurrentDataset(szDatasetName);
+}
+
+char* c_IF2UnPacker::GetPackBuf(void)
+{
+ return (char*)(lpUnPacker->GetPackBuf());
+}
+
+
+int c_IF2UnPacker::GetPackLen()
+{
+ return lpUnPacker->GetPackLen();
+}
+
+int c_IF2UnPacker::GetRowCount(void)
+{
+ return lpUnPacker->GetRowCount();
+}
+
+void c_IF2UnPacker::First()
+{
+ lpUnPacker->First();
+}
+
+void c_IF2UnPacker::Last()
+{
+ lpUnPacker->Last();
+}
+
+void c_IF2UnPacker::Go(int nRow)
+{
+ lpUnPacker->Go(nRow);
+}
+
+char* c_IF2UnPacker::GetDatasetName()
+{
+ return (char*)(lpUnPacker->GetDatasetName());
+}
+
+int c_IF2UnPacker::OpenAndCopy(char* lpBuffer,int iLen)
+{
+ return lpUnPacker->OpenAndCopy(lpBuffer,iLen);
+}
+
+char* c_IF2UnPacker::GetColTypeByName(char * columnName)
+{
+ char cType = lpUnPacker->GetColTypeByName(columnName);
+ char* sType=new char[2];
+ sType[0]=cType;
+ sType[1]='\0';
+ return sType;
+}
+
+int c_IF2UnPacker::GetColScaleByName(char * columnName)
+{
+ return lpUnPacker->GetColScaleByName(columnName);
+}
+
+int c_IF2UnPacker::GetColWidthByName(char * columnName)
+{
+ return lpUnPacker->GetColWidthByName(columnName);
+}
+
+IF2UnPacker* c_IF2UnPacker::GetInstance()
+{
+ return lpUnPacker;
+}
+
+int c_IF2UnPacker::GetColCount()
+{
+ return lpUnPacker->GetColCount();
+}
+
+char* c_IF2UnPacker::GetColName(int column)
+{
+ return (char*)lpUnPacker->GetColName(column);
+}
+char* c_IF2UnPacker::GetColType(int column)
+{
+ char cType = lpUnPacker->GetColType(column);
+ char* sType=new char[2];
+ sType[0]=cType;
+ sType[1]='\0';
+ return sType;
+}
+int c_IF2UnPacker::GetColScale(int column)
+{
+ return lpUnPacker->GetColScale(column);
+}
+int c_IF2UnPacker::GetColWidth(int column)
+{
+ return lpUnPacker->GetColWidth(column);
+}
+int c_IF2UnPacker::FindColIndex(char * columnName)
+{
+ return lpUnPacker->FindColIndex(columnName);
+}
+char* c_IF2UnPacker::GetStrByIndex(int column)
+{
+ return (char*)lpUnPacker->GetStrByIndex(column);
+}
+char* c_IF2UnPacker::GetStr(char * columnName)
+{
+ return (char*)lpUnPacker->GetStr(columnName);
+}
+char* c_IF2UnPacker::GetCharByIndex(int column)
+{
+ char cType = lpUnPacker->GetCharByIndex(column);
+ char* sType=new char[2];
+ sType[0]=cType;
+ sType[1]='\0';
+ return sType;
+}
+char* c_IF2UnPacker::GetChar(char * columnName)
+{
+ char cType = lpUnPacker->GetChar(columnName);
+ char* sType=new char[2];
+ sType[0]=cType;
+ sType[1]='\0';
+ return sType;
+}
+double c_IF2UnPacker::GetDoubleByIndex(int column)
+{
+ return lpUnPacker->GetDoubleByIndex(column);
+}
+double c_IF2UnPacker::GetDouble(char * columnName)
+{
+ return lpUnPacker->GetDouble(columnName);
+}
+int c_IF2UnPacker::GetIntByIndex(int column)
+{
+ return lpUnPacker->GetIntByIndex(column);
+}
+int c_IF2UnPacker::GetInt(char* columnName)
+{
+ return lpUnPacker->GetInt(columnName);
+}
+char* c_IF2UnPacker::GetRawByIndex(int column,int* lpRawLen)
+{
+ return (char*)lpUnPacker->GetRawByIndex(column,lpRawLen);
+}
+char* c_IF2UnPacker::GetRaw(char* columnName,int* lpRawLen)
+{
+ return (char*)lpUnPacker->GetRaw(columnName,lpRawLen);
+}
+int c_IF2UnPacker::WasNull()
+{
+ return lpUnPacker->WasNull();
+}
+void c_IF2UnPacker::Next()
+{
+ lpUnPacker->Next();
+}
+int c_IF2UnPacker::IsEOF()
+{
+ return lpUnPacker->IsEOF();
+}
+int c_IF2UnPacker::IsEmpty()
+{
+ return lpUnPacker->IsEmpty();
+}
+void c_IF2UnPacker::Destroy()
+{
+ lpUnPacker->Destroy();
+}
+
+void c_IF2UnPacker::Release()
+{
+ if (lpUnPacker && bRelease)
+ {
+ lpUnPacker->Release();
+ lpUnPacker = NULL;
+ }
+ if (lpBuf)
+ {
+ free(lpBuf);
+ lpBuf = NULL;
+ }
+}
+
+C_CConfigInterface::C_CConfigInterface()
+{
+ lpConfig = NewConfig();
+ lpConfig->AddRef();
+}
+
+C_CConfigInterface::~C_CConfigInterface()
+{
+
+}
+
+int C_CConfigInterface::Load( char *szFileName)
+{
+ return lpConfig->Load(szFileName);
+}
+
+int C_CConfigInterface::Save( char *szFileName)
+{
+ return lpConfig->Save(szFileName);
+}
+
+char* C_CConfigInterface::GetString(char *szSection,char *szEntry,char *szDefault)
+{
+ return (char*)lpConfig->GetString(szSection,szEntry,szDefault);
+}
+
+int C_CConfigInterface::GetInt(char *szSection,char *szEntry, int iDefault)
+{
+ return lpConfig->GetInt(szSection,szEntry,iDefault);
+}
+
+int C_CConfigInterface::SetString( char *szSection, char *szEntry, char *szValue)
+{
+ return lpConfig->SetString(szSection,szEntry,szValue);
+}
+
+int C_CConfigInterface::SetInt( char *szSection, char *szEntry, int iValue)
+{
+ return lpConfig->SetInt(szSection,szEntry,iValue);
+}
+
+CConfigInterface* C_CConfigInterface::GetInstance()
+{
+ return lpConfig;
+}
+
+void C_CConfigInterface::Release()
+{
+ lpConfig->Release();
+}
+
+c_IBizMessage::c_IBizMessage()
+{
+ lpBizMessage = NewBizMessage();
+ lpBizMessage->AddRef();
+}
+
+c_IBizMessage::~c_IBizMessage()
+{
+
+}
+
+void c_IBizMessage::SetFunction(int nFUnctionNo)
+{
+ lpBizMessage->SetFunction(nFUnctionNo);
+}
+
+int c_IBizMessage::GetFunction()
+{
+ return lpBizMessage->GetFunction();
+}
+
+void c_IBizMessage::SetPacketType(int nPacketType)
+{
+ lpBizMessage->SetPacketType(nPacketType);
+}
+
+int c_IBizMessage::GetPacketType()
+{
+ return lpBizMessage->GetPacketType();
+}
+
+void c_IBizMessage::SetBranchNo(int nBranchNo)
+{
+ return lpBizMessage->SetBranchNo(nBranchNo);
+}
+
+int c_IBizMessage::GetBranchNo()
+{
+ return lpBizMessage->GetBranchNo();
+}
+
+void c_IBizMessage::SetSystemNo(int nSystemNo)
+{
+ lpBizMessage->SetSystemNo(nSystemNo);
+}
+
+int c_IBizMessage::GetSystemNo()
+{
+ return lpBizMessage->GetSystemNo();
+}
+
+void c_IBizMessage::SetSubSystemNo(int nSubSystemNo)
+{
+ return lpBizMessage->SetSubSystemNo(nSubSystemNo);
+}
+
+int c_IBizMessage::GetSubSystemNo()
+{
+ return lpBizMessage->GetSubSystemNo();
+}
+
+void c_IBizMessage::SetSenderId(int nSenderId)
+{
+ lpBizMessage->SetSenderId(nSenderId);
+}
+
+int c_IBizMessage::GetSenderId()
+{
+ return lpBizMessage->GetSenderId();
+}
+
+void c_IBizMessage::SetPacketId(int nPacketId)
+{
+ lpBizMessage->SetPacketId(nPacketId);
+}
+
+int c_IBizMessage::GetPacketId()
+{
+ return lpBizMessage->GetPacketId();
+}
+
+void c_IBizMessage::SetErrorNo(int nErrorNo)
+{
+ lpBizMessage->SetErrorNo(nErrorNo);
+}
+
+int c_IBizMessage::GetErrorNo()
+{
+ return lpBizMessage->GetErrorNo();
+}
+
+void c_IBizMessage::SetErrorInfo(char* strErrorInfo)
+{
+ lpBizMessage->SetErrorInfo(strErrorInfo);
+}
+
+char* c_IBizMessage::GetErrorInfo()
+{
+ return (char*)(lpBizMessage->GetErrorInfo());
+}
+
+void c_IBizMessage::SetReturnCode(int nReturnCode)
+{
+ lpBizMessage->SetReturnCode(nReturnCode);
+}
+
+int c_IBizMessage::GetReturnCode()
+{
+ return lpBizMessage->GetReturnCode();
+}
+
+void c_IBizMessage::SetContent(char* lpContent,int iLen)
+{
+ lpBizMessage->SetContent(lpContent,iLen);
+}
+
+char* c_IBizMessage::GetContent(int& iLen)
+{
+ return (char*)(lpBizMessage->GetContent(iLen));
+}
+
+void c_IBizMessage::SetIssueType(int nIssueType)
+{
+ lpBizMessage->SetIssueType(nIssueType);
+}
+
+int c_IBizMessage::GetIssueType()
+{
+ return lpBizMessage->GetIssueType();
+}
+
+void c_IBizMessage::SetSequeceNo(int nSequeceNo)
+{
+ return lpBizMessage->SetSequeceNo(nSequeceNo);
+}
+
+int c_IBizMessage::GetSequeceNo()
+{
+ return lpBizMessage->GetSequeceNo();
+}
+
+void c_IBizMessage::SetKeyInfo(char* lpKeyData,int iLen)
+{
+ lpBizMessage->SetKeyInfo(lpKeyData,iLen);
+}
+
+char* c_IBizMessage::GetKeyInfo(int& iLen)
+{
+ return (char*)lpBizMessage->GetKeyInfo(iLen);
+}
+
+void c_IBizMessage::SetAppData(char* lpAppdata,int nAppLen)
+{
+ lpBizMessage->SetAppData(lpAppdata,nAppLen);
+}
+
+char* c_IBizMessage::GetAppData(int& nAppLen)
+{
+ return (char*)lpBizMessage->GetAppData(nAppLen);
+}
+
+int c_IBizMessage::ChangeReq2AnsMessage()
+{
+ return lpBizMessage->ChangeReq2AnsMessage();
+}
+
+char* c_IBizMessage::GetBuff(int& nBuffLen)
+{
+ return (char*)lpBizMessage->GetBuff(nBuffLen);
+}
+
+int c_IBizMessage::SetBuff(char* lpBuff,int nBuffLen)
+{
+ return lpBizMessage->SetBuff(lpBuff,nBuffLen);
+}
+
+void c_IBizMessage::ReSet()
+{
+ lpBizMessage->ReSet();
+}
+
+IBizMessage* c_IBizMessage::GetInstance()
+{
+ return lpBizMessage;
+}
+
+void c_IBizMessage::Release()
+{
+ lpBizMessage->Release();
+}
+
+c_CSubscribeParamInterface::c_CSubscribeParamInterface()
+{
+ lpSubParam = NewSubscribeParam();
+ lpSubParam->AddRef();
+}
+
+c_CSubscribeParamInterface::~c_CSubscribeParamInterface()
+{
+
+}
+
+void c_CSubscribeParamInterface::SetTopicName(char* szName)
+{
+ lpSubParam->SetTopicName(szName);
+}
+
+void c_CSubscribeParamInterface::SetAppData(char* lpData,int iLen)
+{
+ lpSubParam->SetAppData(lpData,iLen);
+}
+
+void c_CSubscribeParamInterface::SetFilter(char* filterName,char* filterValue)
+{
+ lpSubParam->SetFilter(filterName,filterValue);
+}
+
+void c_CSubscribeParamInterface::SetReturnFiled(char* filedName)
+{
+ lpSubParam->SetReturnFiled(filedName);
+}
+
+void c_CSubscribeParamInterface::SetFromNow(int bFromNow)
+{
+ bool bFN = false;
+ if(bFromNow > 0)
+ bFN = true;
+ lpSubParam->SetFromNow(bFN);
+}
+
+void c_CSubscribeParamInterface::SetReplace(int bReplace)
+{
+ bool bRe = false;
+ if(bReplace > 0)
+ bRe = true;
+ lpSubParam->SetFromNow(bRe);
+}
+
+void c_CSubscribeParamInterface::SetSendInterval(int nSendInterval)
+{
+ lpSubParam->SetSendInterval(nSendInterval);
+}
+
+char* c_CSubscribeParamInterface::GetTopicName()
+{
+ return (char*)lpSubParam->GetTopicName();
+}
+
+char* c_CSubscribeParamInterface::GetAppData(int *iLen)
+{
+ return (char*)lpSubParam->GetAppData(iLen);
+}
+
+char* c_CSubscribeParamInterface::GetFilterNameByIndex(int index)
+{
+ return (char*)lpSubParam->GetFilterNameByIndex(index);
+}
+
+char* c_CSubscribeParamInterface::GetFilterValueByIndex(int index)
+{
+ return (char*)lpSubParam->GetFilterValueByIndex(index);
+}
+
+char* c_CSubscribeParamInterface::GetFilterValue(char* fileName)
+{
+ return (char*)lpSubParam->GetFilterValue(fileName);
+}
+
+int c_CSubscribeParamInterface::GetFilterCount()
+{
+ return lpSubParam->GetFilterCount();
+}
+
+char* c_CSubscribeParamInterface::GetReturnFiled()
+{
+ return (char*)lpSubParam->GetReturnFiled();
+}
+
+int c_CSubscribeParamInterface::GetFromNow()
+{
+ return lpSubParam->GetFromNow();
+}
+
+int c_CSubscribeParamInterface::GetReplace()
+{
+ return lpSubParam->GetReplace();
+}
+
+int c_CSubscribeParamInterface::GetSendInterval()
+{
+ return lpSubParam->GetSendInterval();
+}
+
+CSubscribeParamInterface* c_CSubscribeParamInterface::GetInstance()
+{
+ return lpSubParam;
+}
+
+void c_CSubscribeParamInterface::Release()
+{
+ lpSubParam->Release();
+}
+
+c_SubCallBack::c_SubCallBack(char *lpMould,char *lpClass)
+{
+ strcpy_s(lpCallMould,lpMould);
+ strcpy_s(lpCallClass,lpClass);
+ DealMsgQueue = new std::queue();
+ IsRun=true;
+ for (int i = 0; i < 2; i++)
+ {
+ char threadName[12] = {0};
+ sprintf_s(threadName,"sub_thread%d",GetThreadNum());
+ EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName);
+ }
+ gMsgQueueSection = new CRITICAL_SECTION;
+ InitializeCriticalSection(gMsgQueueSection);
+}
+
+c_SubCallBack::~c_SubCallBack()
+{
+ IsRun=false;
+ SetEvent(EventHandle[1]);
+ Py_Finalize();
+}
+
+c_SubCallBack::c_SubCallBack()
+{
+ if (!Py_IsInitialized())
+ {
+ Py_Initialize();
+ PyRun_SimpleString("import sys");
+ PyRun_SimpleString("sys.path.append('./')");
+ }
+}
+
+int c_SubCallBack::initInstance()
+{
+ pModule = NULL;
+ if (!Py_IsInitialized())
+ {
+ Py_Initialize();
+ PyEval_InitThreads();
+ PyRun_SimpleString("import sys");
+ PyRun_SimpleString("sys.path.append('./')");
+ }
+ pModule = PyImport_ImportModule(lpCallMould);
+ if (!pModule)
+ {
+ printf("Can`t open python file!\n");
+ return -1;
+ }
+ pDict = PyModule_GetDict(pModule);
+ if(!pDict)
+ {
+ printf("Can`t open Get Dict!\n");
+ return -1;
+ }
+ pClass = PyObject_GetAttrString(pModule, lpCallClass);
+ if(!pClass)
+ {
+ printf("Can`t open Get Class!\n");
+ return -1;
+ }
+ pObject = PyEval_CallObject(pClass, NULL);
+ if(!pObject)
+ {
+ printf("%s Class init failed!\n",lpCallClass);
+ return -1;
+ }
+ pOnReceiveFunc=PyObject_GetAttrString(pObject, "OnReceived");
+ if(!pOnReceiveFunc)
+ {
+ printf("OnReceived function init failed!\n");
+ return -1;
+ }
+ Thread = new std::thread(&c_SubCallBack::run,this);
+ return 0;
+}
+
+void c_SubCallBack::run()
+{
+ while(IsRun)
+ {
+ CSubCalBackPara* lpMsg;
+ int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE);
+ PyObject* list = NULL;
+ state = PyGILState_Ensure();
+ Py_INCREF(pClass);
+ switch(index)
+ {
+ case WAIT_OBJECT_0:
+ EnterCriticalSection(gMsgQueueSection);
+ while( DealMsgQueue->size() > 0)
+ {
+ lpMsg = DealMsgQueue->front();
+ DealMsgQueue->pop();
+ LeaveCriticalSection(gMsgQueueSection);
+ int iLenght;
+ char* lpBuff = (char*)(lpMsg->lpBizMsg->GetBuff(iLenght));
+ list = PyList_New(0);
+ for (int i = 0; i < iLenght; i++)
+ {
+ int iTemp = lpBuff[i];
+ PyList_Append(list, Py_BuildValue("i", iTemp));
+ }
+ char * lpTopic = lpMsg->szTopicName;
+ PyObject* call = PyObject_CallFunction(pOnReceiveFunc,"sOi",lpTopic,list,iLenght);
+ Py_CLEAR(call);
+ Py_DECREF(list);
+ delete lpMsg;
+ EnterCriticalSection(gMsgQueueSection);
+ }
+ LeaveCriticalSection(gMsgQueueSection);
+ break;
+ case WAIT_OBJECT_0 + 1:
+ IsRun = false;
+ break;
+ }
+ PyGILState_Release(state);
+ }
+}
+
+void c_SubCallBack::OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData)
+{
+ if (lpData == NULL || nLength <= 0)
+ {
+ printf("ָΪ\n");
+ return;
+ }
+ CSubCalBackPara * lpPara = new CSubCalBackPara();
+ lpPara->lpBizMsg = NewBizMessage();
+ lpPara->lpBizMsg->AddRef();
+ strncpy_s(lpPara->szTopicName,lpRecvData->szTopicName,sizeof(lpPara->szTopicName)-1);
+ lpPara->lpBizMsg->SetContent((void*)lpData,nLength);
+ lpPara->lpBizMsg->SetKeyInfo(lpRecvData->lpFilterData,lpRecvData->iFilterDataLen);
+ lpPara->lpBizMsg->SetAppData(lpRecvData->lpAppData,lpRecvData->iAppDataLen);
+
+ EnterCriticalSection(gMsgQueueSection);
+ DealMsgQueue->push(lpPara);
+ LeaveCriticalSection(gMsgQueueSection);
+ SetEvent(EventHandle[0]);
+}
+
+void c_SubCallBack::OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo)
+{
+ printf("OnRecvTickMsg");
+}
+
+c_CSubscribeInterface::c_CSubscribeInterface(CSubscribeInterface* lpSub)
+{
+ lpSubscribe = lpSub;
+ lpSubscribe->AddRef();
+}
+
+c_CSubscribeInterface::~c_CSubscribeInterface()
+{
+
+}
+
+int c_CSubscribeInterface::SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack,c_IF2Packer* lpBizPack)
+{
+ CSubscribeParamInterface* lpParam = lpSubscribeParamInter->GetInstance();
+ IF2UnPacker* lpUnpack = NULL;
+ IF2Packer* lpPack = NULL;
+ int ret = -1;
+ if(lpBizPack != NULL)
+ {
+ lpPack = lpBizPack->GetInstance();
+ IF2UnPacker* lpTempUnPacker = NULL;
+ ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout,&lpTempUnPacker,lpPack);
+ if(lpTempUnPacker != NULL)
+ *lppBizUnPack = new c_IF2UnPacker(lpTempUnPacker);
+ }
+ else
+ {
+ ret = lpSubscribe->SubscribeTopic(lpParam,uiTimeout);
+ }
+ return ret;
+}
+
+
+int c_CSubscribeInterface::CancelSubscribeTopic(int subscribeIndex)
+{
+ return lpSubscribe->CancelSubscribeTopic(subscribeIndex);
+}
+
+int c_CSubscribeInterface::CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface)
+{
+ return lpSubscribe->CancelSubscribeTopicEx(topicName,lpFilterInterface);
+}
+
+void c_CSubscribeInterface::GetSubcribeTopic(c_IF2Packer* lpPack)
+{
+ lpSubscribe->GetSubcribeTopic(lpPack->GetInstance());
+}
+void c_CSubscribeInterface::Release()
+{
+ if (lpSubscribe)
+ {
+ lpSubscribe->Release();
+ }
+}
+
+c_CCallbackInterface::c_CCallbackInterface()
+{
+ if (!Py_IsInitialized())
+ {
+ Py_Initialize();
+ PyEval_InitThreads();
+ PyRun_SimpleString("import sys");
+ PyRun_SimpleString("sys.path.append('./')");
+ }
+}
+
+c_CCallbackInterface::c_CCallbackInterface(char* sMould,char* sClass)
+{
+ strcpy_s(sMouldName, sMould);
+ strcpy_s(sClassName, sClass);
+ DealMsgQueue = new std::queue();
+ IsRun=true;
+ for (int i = 0; i < 2; i++)
+ {
+ char threadName[12] = {0};
+ sprintf_s(threadName,"thread%d",GetThreadNum());
+ EventHandle[i] = CreateEvent(NULL, FALSE, FALSE, (LPCTSTR)threadName);
+ }
+ gMsgQueueSection = new CRITICAL_SECTION;
+ InitializeCriticalSection(gMsgQueueSection);
+}
+
+c_CCallbackInterface::~c_CCallbackInterface()
+{
+ IsRun=false;
+ SetEvent(EventHandle[1]);
+ Py_Finalize();
+}
+
+void c_CCallbackInterface::run()
+{
+ while(IsRun)
+ {
+ CCallBackParam* lpMsg;
+ int index = WaitForMultipleObjects(2, EventHandle, FALSE, INFINITE);
+ PyObject* list = NULL;
+ PyObject* call;
+ state = PyGILState_Ensure();
+ Py_INCREF(pClass);
+ switch(index)
+ {
+ case WAIT_OBJECT_0:
+ EnterCriticalSection(gMsgQueueSection);
+ while( DealMsgQueue->size() > 0)
+ {
+ lpMsg = DealMsgQueue->front();
+ DealMsgQueue->pop();
+ LeaveCriticalSection(gMsgQueueSection);
+
+ switch(lpMsg->iCallFuncType)
+ {
+ case 0:
+ //PyObject_CallFunction(pConnectFunc,NULL);
+ break;
+ case 1:
+ //PyObject_CallFunction(pSafeConnectFunc,NULL);
+ break;
+ case 2:
+ call = PyObject_CallFunction(pRegisterFunc,NULL);
+ Py_CLEAR(call);
+ break;
+ case 3:
+ call = PyObject_CallFunction(pCloseFunc,NULL);
+ Py_CLEAR(call);
+ break;
+ case 4:
+ //PyObject_CallFunction(pSendFunc,NULL);
+ break;
+ case 5:
+ if(lpMsg->iResult == 0 || lpMsg->iResult == 1)
+ {
+ char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf());
+ int iLenght = lpMsg->lpUnPacker->GetPackLen();
+ list = PyList_New(0);
+ for (int i = 0; i < iLenght; i++)
+ {
+ int iTemp = lpBuff[i];
+ PyList_Append(list, Py_BuildValue("i", iTemp));
+ }
+ //PyObject_CallFunction(pReceivedBizFunc,"iOi",lpMsg->hSend,list,iLenght);
+ }
+ else
+ {
+ //PyObject_CallFunction(pReceivedBizFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue));
+ }
+ break;
+ case 6:
+ if(lpMsg->iResult == 0 || lpMsg->iResult == 1)
+ {
+ char* lpBuff = (char*)(lpMsg->lpUnPacker->GetPackBuf());
+ int iLenght = lpMsg->lpUnPacker->GetPackLen();
+ list = PyList_New(0);
+ for (int i = 0; i < iLenght; i++)
+ {
+ int iTemp = lpBuff[i];
+ PyList_Append(list, Py_BuildValue("i", iTemp));
+ }
+ //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght);
+ }
+ else
+ {
+ //PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue));
+ }
+ break;
+ case 7:
+ {
+ //if(lpMsg->iResult == 0 || lpMsg->iResult == 1)
+ //{
+
+ int iLenght = 0;
+ //char* lpBuff = (char*)(lpMsg->lpBizMsg->GetContent(iLenght));
+ char* lpBuff = (char*)lpMsg->lpBizMsg->GetBuff(iLenght);
+ list = PyList_New(0);
+ for (int i = 0; i < iLenght; i++)
+ {
+ int iTemp = lpBuff[i];
+ PyList_Append(list, Py_BuildValue("i", iTemp));
+ }
+ //PyObject_CallFunction(pReceivedBizExFunc,"iOi",lpMsg->hSend,list,iLenght);
+ //}
+ //else
+ //{
+ // PyObject_CallFunction(pReceivedBizExFunc,"isi",lpMsg->hSend,lpMsg->sValue,strlen(lpMsg->sValue));
+ //}
+ //PyObject_CallFunction(pReceivedBizMsgFunc,NULL);
+ call = PyObject_CallFunction(pReceivedBizMsgFunc,"iOi",lpMsg->hSend,list,iLenght);
+ Py_CLEAR(call);
+ Py_DECREF(list);
+ }
+ break;
+ default:
+ printf("unkown event\n");
+ }
+ delete(lpMsg);
+ EnterCriticalSection(gMsgQueueSection);
+ }
+ LeaveCriticalSection(gMsgQueueSection);
+ break;
+ case WAIT_OBJECT_0 + 1:
+ IsRun = false;
+ break;
+ default:
+ printf("unkown wait\n");
+ }
+ PyGILState_Release(state);
+ }
+}
+
+int c_CCallbackInterface::InitInstance()
+{
+ pModule = NULL;
+ if (!Py_IsInitialized())
+ {
+ Py_Initialize();
+ PyEval_InitThreads();
+ PyRun_SimpleString("import sys");
+ PyRun_SimpleString("sys.path.append('./')");
+ }
+ pModule = PyImport_ImportModule(sMouldName);
+ if (!pModule)
+ {
+ printf("Cant open python file!\n");
+ return -1;
+ }
+ pDict = PyModule_GetDict(pModule);
+ if(!pDict)
+ {
+ printf("Cant open Get Dict!\n");
+ return -1;
+ }
+ pClass = PyObject_GetAttrString(pModule, sClassName);
+ if(!pClass)
+ {
+ printf("Cant open Get Class!\n");
+ return -1;
+ }
+ pObject = PyEval_CallObject(pClass, NULL);
+ if(!pObject)
+ {
+ printf("Class install failed!\n");
+ return -1;
+ }
+
+ // pConnectFunc=PyObject_GetAttrString(pObject, "OnConnect");
+ //if(!pConnectFunc)
+ //{
+ // printf("OnConnect function init failed!\n");
+ // return -1;
+ //}
+
+ //pSafeConnectFunc=PyObject_GetAttrString(pObject, "OnSafeConnect");
+ //if(!pSafeConnectFunc)
+ //{
+ // printf("OnSafeConnect function init failed!\n");
+ // return -1;
+ //}
+
+ pRegisterFunc=PyObject_GetAttrString(pObject, "OnRegister");
+ if(!pRegisterFunc)
+ {
+ printf("OnRegister function init failed!\n");
+ return -1;
+ }
+
+ //pSendFunc=PyObject_GetAttrString(pObject, "OnSent");
+ //if(!pSendFunc)
+ //{
+ // printf("OnSent function init failed!\n");
+ // return -1;
+ //}
+
+ pCloseFunc=PyObject_GetAttrString(pObject, "OnClose");
+ if(!pCloseFunc)
+ {
+ printf("OnClose function init failed!\n");
+ return -1;
+ }
+
+ //pReceivedBizFunc=PyObject_GetAttrString(pObject, "OnReceivedBiz");
+ //if(!pReceivedBizFunc)
+ //{
+ // printf("OnReceivedBiz function init failed!\n");
+ // return -1;
+ //}
+
+ //pReceivedBizExFunc=PyObject_GetAttrString(pObject, "OnReceivedBizEx");
+ //if(!pReceivedBizExFunc)
+ //{
+ // printf("OnReceivedBizEx function init failed!\n");
+ // return -1;
+ //}
+
+ pReceivedBizMsgFunc=PyObject_GetAttrString(pObject, "OnReceivedBizMsg");
+ if(!pReceivedBizMsgFunc)
+ {
+ printf("OnReceivedBizMsg function init failed!\n");
+ return -1;
+ }
+ Thread = new std::thread(&c_CCallbackInterface::run,this);
+ return 0;
+}
+
+void c_CCallbackInterface::OnConnect(CConnectionInterface *lpConnection)
+{
+ //CCallBackParam* lpMsg = new CCallBackParam();
+ //lpMsg->iResult = 0;
+ //lpMsg->iCallFuncType = 0;
+ //lpMsg->lpBizMsg = NULL;
+ //lpMsg->lpUnPacker = NULL;
+ //EnterCriticalSection(gMsgQueueSection);
+ // DealMsgQueue->push(lpMsg);
+ // LeaveCriticalSection(gMsgQueueSection);
+ //SetEvent(EventHandle[0]);
+}
+
+void c_CCallbackInterface::OnSafeConnect(CConnectionInterface *lpConnection)
+{
+ //printf("OnSafeConnect!\n");
+ //CCallBackParam* lpMsg = new CCallBackParam();
+ //lpMsg->iResult = 0;
+ //lpMsg->iCallFuncType = 1;
+ //lpMsg->lpBizMsg = NULL;
+ //lpMsg->lpUnPacker = NULL;
+ //EnterCriticalSection(gMsgQueueSection);
+ // DealMsgQueue->push(lpMsg);
+ // LeaveCriticalSection(gMsgQueueSection);
+ ////state = PyGILState_Ensure();
+ //SetEvent(EventHandle[0]);
+ ////PyObject_CallFunction(pSafeConnectFunc,NULL);
+ ////PyGILState_Release(state);
+}
+
+void c_CCallbackInterface::OnRegister(CConnectionInterface *lpConnection)
+{
+ CCallBackParam* lpMsg = new CCallBackParam();
+ lpMsg->iResult = 0;
+ lpMsg->iCallFuncType = 2;
+ lpMsg->lpBizMsg = NULL;
+ lpMsg->lpUnPacker = NULL;
+ EnterCriticalSection(gMsgQueueSection);
+ DealMsgQueue->push(lpMsg);
+ LeaveCriticalSection(gMsgQueueSection);
+ //state = PyGILState_Ensure();
+ SetEvent(EventHandle[0]);
+ //PyObject_CallFunction(pRegisterFunc,NULL);
+ //PyGILState_Release(state);
+}
+
+void c_CCallbackInterface::OnClose(CConnectionInterface *lpConnection)
+{
+ CCallBackParam* lpMsg = new CCallBackParam();
+ lpMsg->iResult = 0;
+ lpMsg->iCallFuncType = 3;
+ lpMsg->lpBizMsg = NULL;
+ lpMsg->lpUnPacker = NULL;
+ EnterCriticalSection(gMsgQueueSection);
+ DealMsgQueue->push(lpMsg);
+ LeaveCriticalSection(gMsgQueueSection);
+ //state = PyGILState_Ensure();
+ SetEvent(EventHandle[0]);
+ //PyObject_CallFunction(pCloseFunc,NULL);
+ //PyGILState_Release(state);
+}
+
+void c_CCallbackInterface::OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData)
+{
+ //printf("OnSent!\n");
+ //CCallBackParam* lpMsg = new CCallBackParam();
+ //lpMsg->iResult = 0;
+ //lpMsg->iCallFuncType = 4;
+ //lpMsg->lpBizMsg = NULL;
+ //lpMsg->lpUnPacker = NULL;
+ //EnterCriticalSection(gMsgQueueSection);
+ // DealMsgQueue->push(lpMsg);
+ // LeaveCriticalSection(gMsgQueueSection);
+ ////state = PyGILState_Ensure();
+ //SetEvent(EventHandle[0]);
+ ////PyObject_CallFunction(pSendFunc,NULL);
+ ////PyGILState_Release(state);
+}
+
+void c_CCallbackInterface::Reserved1(void *a, void *b, void *c, void *d)
+{
+}
+
+void c_CCallbackInterface::Reserved2(void *a, void *b, void *c, void *d)
+{
+}
+
+int c_CCallbackInterface::Reserved3()
+{
+ return 0;
+}
+
+void c_CCallbackInterface::Reserved4()
+{
+}
+
+void c_CCallbackInterface::Reserved5()
+{
+}
+
+void c_CCallbackInterface::Reserved6()
+{
+}
+
+void c_CCallbackInterface::Reserved7()
+{
+}
+
+void c_CCallbackInterface::OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult)
+{
+ //printf("OnReceivedBiz!\n");
+ //CCallBackParam* lpMsg = new CCallBackParam();
+ //lpMsg->hSend = hSend;
+ //lpMsg->iResult = nResult;
+ //lpMsg->iCallFuncType = 5;
+ //lpMsg->lpBizMsg = NULL;
+ //if(nResult == 0 || nResult == 1)
+ //{
+ // void* lpBuff = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackBuf();
+ // int iLen = ((IF2UnPacker*)lpUnPackerOrStr)->GetPackLen();
+ // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen);
+ //}
+ //else
+ //{
+ // char* sInfo = (char*)lpUnPackerOrStr;
+ // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo));
+ // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo);
+ //}
+ //EnterCriticalSection(gMsgQueueSection);
+ // DealMsgQueue->push(lpMsg);
+ // LeaveCriticalSection(gMsgQueueSection);
+ //SetEvent(EventHandle[0]);
+}
+
+void c_CCallbackInterface::OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult)
+{
+ //printf("OnReceivedBizEx!\n");
+ //CCallBackParam* lpMsg = new CCallBackParam();
+ //lpMsg->hSend = hSend;
+ //lpMsg->iResult = nResult;
+ //lpMsg->iCallFuncType = 6;
+ //lpMsg->lpBizMsg = NULL;
+ //if(nResult == 0 || nResult == 1)
+ //{
+ // void* lpBuff = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackBuf();
+ // int iLen = ((IF2UnPacker*)lpUnpackerOrStr)->GetPackLen();
+ // lpMsg->lpUnPacker = NewUnPacker(lpBuff,iLen);
+ //}
+ //else
+ //{
+ // char* sInfo = (char*)lpUnpackerOrStr;
+ // lpMsg->sValue = (char*)malloc(sizeof(char)*strlen(sInfo));
+ // strcpy_s(lpMsg->sValue,strlen(sInfo),sInfo);
+ //}
+ //EnterCriticalSection(gMsgQueueSection);
+ //DealMsgQueue->push(lpMsg);
+ //LeaveCriticalSection(gMsgQueueSection);
+ //state = PyGILState_Ensure();
+ //SetEvent(EventHandle[0]);
+ //PyGILState_Release(state);
+}
+
+void c_CCallbackInterface::OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg)
+{
+ //printf("OnReceivedBizMsg!\n");
+ CCallBackParam* lpCallMsg = new CCallBackParam();
+ lpCallMsg->hSend = hSend;
+ lpCallMsg->iResult = 0;
+ lpCallMsg->iCallFuncType = 7;
+ lpCallMsg->lpUnPacker = NULL;
+ int iLen = 0;
+ const void* lpBuff = lpMsg->GetBuff(iLen);
+ lpCallMsg->lpBizMsg = NewBizMessage();
+ lpCallMsg->lpBizMsg->AddRef();
+ lpCallMsg->lpBizMsg->SetBuff((void*)lpBuff,iLen);
+ EnterCriticalSection(gMsgQueueSection);
+ DealMsgQueue->push(lpCallMsg);
+ LeaveCriticalSection(gMsgQueueSection);
+ state = PyGILState_Ensure();
+ SetEvent(EventHandle[0]);
+ PyGILState_Release(state);
+}
+
+c_CConnectionInterface::c_CConnectionInterface(C_CConfigInterface* lpConfig)
+{
+ lpConnect = NewConnection(lpConfig->GetInstance());
+ lpConnect->AddRef();
+}
+
+c_CConnectionInterface::~c_CConnectionInterface()
+{
+}
+
+int c_CConnectionInterface::Connect(unsigned int uiTimeout)
+{
+ return lpConnect->Connect(uiTimeout);
+}
+
+int c_CConnectionInterface::Close()
+{
+ return lpConnect->Close();
+}
+
+char* c_CConnectionInterface::GetServerAddress(int* lpPort)
+{
+ return (char*)lpConnect->GetServerAddress(lpPort);
+}
+
+int c_CConnectionInterface::GetStatus()
+{
+ return lpConnect->GetStatus();
+}
+
+int c_CConnectionInterface::GetServerLoad()
+{
+ return lpConnect->GetServerLoad();
+}
+
+char* c_CConnectionInterface::GetErrorMsg(int nErrorCode)
+{
+ return (char*)lpConnect->GetErrorMsg(nErrorCode);
+}
+
+int c_CConnectionInterface::GetConnectError()
+{
+ return lpConnect->GetConnectError();
+}
+
+char* c_CConnectionInterface::GetRealAddress()
+{
+ return (char*)lpConnect->GetRealAddress();
+}
+char* c_CConnectionInterface::GetSelfAddress()
+{
+ return (char*)lpConnect->GetSelfAddress();
+}
+
+char* c_CConnectionInterface::GetSelfMac()
+{
+ return (char*)lpConnect->GetSelfMac();
+}
+
+c_CSubscribeInterface* c_CConnectionInterface::NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut,
+ int iInitRecvQLen,int iStepRecvQLen)
+{
+ CSubscribeInterface* lpSub = lpConnect->NewSubscriber(lpCallback, SubScribeName,iTimeOut,iInitRecvQLen,iStepRecvQLen);
+ c_CSubscribeInterface* lp = NULL;
+ if (lpSub != NULL)
+ {
+ lp= new c_CSubscribeInterface(lpSub);
+ }
+ return lp;
+}
+
+c_IF2UnPacker* c_CConnectionInterface::GetTopic(int byForce,int iTimeOut)
+{
+ bool bForce = false;
+ if(byForce > 0)
+ bForce = true;
+ IF2UnPacker* lpUnpack = lpConnect->GetTopic(bForce,iTimeOut);
+ c_IF2UnPacker* lpUnpacker = new c_IF2UnPacker(lpUnpack);
+ return lpUnpacker;
+}
+
+char* c_CConnectionInterface::GetMCLastError()
+{
+ return (char*)lpConnect->GetMCLastError();
+}
+
+int c_CConnectionInterface::Create2BizMsg(c_CCallbackInterface *lpCallback)
+{
+ return lpConnect->Create2BizMsg(lpCallback);
+}
+
+int c_CConnectionInterface::SendBizMsg(c_IBizMessage* lpMsg,int nAsy)
+{
+ return lpConnect->SendBizMsg(lpMsg->GetInstance(),nAsy);
+}
+
+int c_CConnectionInterface::RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout, unsigned uiFlag)
+{
+ IBizMessage* lpBizMsg = lpMsg->GetInstance();
+ IBizMessage* lpRecv = NULL;
+ int iRet = lpConnect->RecvBizMsg(hSend,&lpRecv,uiTimeout,uiFlag);
+ if (iRet == 0 && lpRecv != NULL) //ճɹ
+ {
+ int iLen = 0;
+ void * lpBuf = lpRecv->GetBuff(iLen);
+ lpBizMsg->SetBuff(lpBuf,iLen);
+ }
+ return iRet;
+}
+char* c_CConnectionInterface::GetLastAnsError(int bAsyError)
+{
+ bool bAs = false;
+ if(bAsyError > 0)
+ bAs = true;
+ return (char*)lpConnect->GetLastAnsError(bAs);
+}
+void c_CConnectionInterface::Release()
+{
+ lpConnect->Release();
+}
+
diff --git a/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h
new file mode 100644
index 0000000000..643273364d
--- /dev/null
+++ b/vnpy/api/t2sdk/py_t2sdk/ufx_interface.h
@@ -0,0 +1,388 @@
+#ifndef _UFX_INTERFACE_H_
+#define _UFX_INTERFACE_H_
+#include "t2sdk_interface.h"
+#include "python.h"
+#include
+#include
+#include
+#include
+
+
+class c_IF2Packer;
+class c_IF2UnPacker;
+
+struct CCallBackParam{
+ int hSend;
+ int iResult;
+ int iCallFuncType; //ص
+ IF2UnPacker* lpUnPacker;
+ IBizMessage* lpBizMsg;
+ char* sValue;
+ CCallBackParam()
+ {
+ memset(this , 0, sizeof(CCallBackParam));
+ }
+ ~CCallBackParam()
+ {
+ if (lpUnPacker)
+ {
+ lpUnPacker->Release();
+ lpUnPacker = NULL;
+ }
+ if (lpBizMsg)
+ {
+ lpBizMsg->Release();
+ lpBizMsg = NULL;
+ }
+ if (sValue)
+ {
+ free(sValue);
+ sValue = NULL;
+ }
+ }
+};
+struct CSubCalBackPara
+{
+ char szTopicName[256];
+ IBizMessage* lpBizMsg;
+ CSubCalBackPara()
+ {
+ memset(this, 0, sizeof(CSubCalBackPara));
+ }
+ ~CSubCalBackPara()
+ {
+ if (lpBizMsg)
+ {
+ lpBizMsg->Release();
+ lpBizMsg = NULL;
+ }
+ }
+
+};
+class c_IF2Packer
+{
+private:
+ IF2Packer* lpPacker;
+public:
+ c_IF2Packer();
+ ~c_IF2Packer();
+ void SetBuffer(char* pBuf,int iBufSize,int iDataLen);
+ void BeginPack();
+ int NewDataset(char *szDatasetName, int iReturnCode );
+ int AddField(char *szFieldName,char cFieldType='S',int iFieldWidth=255,int iFieldScale=4);
+ int AddStr(char *szValue);
+ int AddInt(int iValue);
+ int AddDouble(double fValue);
+ int AddChar(char* cValue);
+ int AddRaw(char* lpBuff,int iLen);
+ void EndPack();
+ int* GetPackBuf();
+ int GetPackLen();
+ int GetPackBufSize();
+ int GetVersion();
+ void SetReturnCode(long dwRetCode);
+ c_IF2UnPacker* UnPack();
+ void FreeMem();
+ void ClearValue();
+ void BeginPackEx(char* szName = NULL);
+ void ClearDataSet();
+ IF2Packer* GetInstance();
+ void Release();
+};
+
+class c_IF2UnPacker
+{
+private:
+ IF2UnPacker* lpUnPacker;
+ void * lpBuf;
+ bool bRelease;
+public:
+ c_IF2UnPacker(char* lpBuffer,int iLen);
+ c_IF2UnPacker(IF2UnPacker* lpUnPack);
+ ~c_IF2UnPacker();
+ int GetVersion(void);
+ int Open(char* lpBuffer,int iLen);
+ int GetDatasetCount();
+ int SetCurrentDatasetByIndex(int nIndex);
+ int SetCurrentDataset(char *szDatasetName);
+ char* GetPackBuf();
+ int GetPackLen();
+ int GetRowCount();
+ void First();
+ void Last();
+ void Go(int nRow);
+ char* GetDatasetName();
+ int OpenAndCopy(char* lpBuffer,int iLen);
+ char* GetColTypeByName(char * columnName);
+ int GetColScaleByName(char * columnName);
+ int GetColWidthByName(char * columnName);
+ IF2UnPacker* GetInstance();
+ int GetColCount();
+ char* GetColName(int column);
+ char* GetColType(int column);
+ int GetColScale(int column);
+ int GetColWidth(int column);
+ int FindColIndex(char * columnName);
+ char* GetStrByIndex(int column);
+ char* GetStr(char * columnName);
+ char* GetCharByIndex(int column);
+ char* GetChar(char * columnName);
+ double GetDoubleByIndex( int column);
+ double GetDouble(char * columnName);
+ int GetIntByIndex(int column);
+ int GetInt(char * columnName);
+ char* GetRawByIndex(int column,int * lpRawLen);
+ char* GetRaw(char * columnName,int * lpRawLen);
+ int WasNull();
+ void Next();
+ int IsEOF();
+ int IsEmpty();
+ void Destroy();
+ void Release();
+};
+
+class C_CConfigInterface
+{
+private:
+ CConfigInterface* lpConfig;
+public:
+ C_CConfigInterface();
+ ~C_CConfigInterface();
+ int Load( char *szFileName);
+ int Save( char *szFileName);
+ char * GetString( char *szSection, char *szEntry, char *szDefault);
+ int GetInt( char *szSection, char *szEntry, int iDefault);
+ int SetString( char *szSection, char *szEntry, char *szValue);
+ int SetInt( char *szSection, char *szEntry, int iValue);
+ CConfigInterface* GetInstance();
+ void Release();
+};
+
+class c_IBizMessage
+{
+private:
+ IBizMessage* lpBizMessage;
+public:
+ c_IBizMessage();
+ ~c_IBizMessage();
+ void SetFunction(int nFUnctionNo);
+ int GetFunction();
+ void SetPacketType(int nPacketType);
+ int GetPacketType();
+ void SetBranchNo(int nBranchNo);
+ int GetBranchNo();
+ void SetSystemNo(int nSystemNo);
+ int GetSystemNo();
+ void SetSubSystemNo(int nSubSystemNo);
+ int GetSubSystemNo();
+ void SetSenderId(int nSenderId);
+ int GetSenderId();
+ void SetPacketId(int nPacketId);
+ int GetPacketId();
+ void SetErrorNo(int nErrorNo);
+ int GetErrorNo();
+ void SetErrorInfo(char* strErrorInfo);
+ char* GetErrorInfo();
+ void SetReturnCode(int nReturnCode);
+ int GetReturnCode();
+ void SetContent(char* lpContent,int iLen);
+ char* GetContent(int& iLen);
+ void SetIssueType(int nIssueType);
+ int GetIssueType();
+ void SetSequeceNo(int nSequeceNo);
+ int GetSequeceNo();
+ void SetKeyInfo(char* lpKeyData,int iLen);
+ char* GetKeyInfo(int& iLen);
+ void SetAppData(char* lpAppdata,int nAppLen);
+ char* GetAppData(int& nAppLen);
+ int ChangeReq2AnsMessage();
+ char* GetBuff(int& nBuffLen);
+ int SetBuff(char* lpBuff,int nBuffLen);
+ void ReSet();
+ IBizMessage* GetInstance();
+ void Release();
+};
+
+class c_CSubscribeParamInterface
+{
+private:
+ CSubscribeParamInterface* lpSubParam;
+public:
+ c_CSubscribeParamInterface();
+ ~c_CSubscribeParamInterface();
+ void SetTopicName(char* szName);
+ void SetAppData(char* lpData,int iLen);
+ void SetFilter(char* filterName,char* filterValue);
+ void SetReturnFiled(char* filedName);
+ void SetFromNow(int bFromNow);
+ void SetReplace(int bReplace);
+ void SetSendInterval(int nSendInterval);
+ char* GetTopicName();
+ char* GetAppData(int *iLen);
+ char* GetFilterNameByIndex(int index);
+ char* GetFilterValueByIndex(int index);
+ char* GetFilterValue(char* fileName);
+ int GetFilterCount();
+ char* GetReturnFiled();
+ int GetFromNow();
+ int GetReplace();
+ int GetSendInterval();
+ CSubscribeParamInterface* GetInstance();
+ void Release();
+};
+
+class c_SubCallBack: public CSubCallbackInterface
+{
+private:
+ PyObject* pModule;
+ PyObject* pDict;
+ PyObject* pClass;
+ PyObject* pObject;
+ PyObject* pOnReceiveFunc;
+ char lpCallMould[50];
+ char lpCallClass[50];
+ PyGILState_STATE state;
+ HANDLE EventHandle[2];
+ std::thread* Thread;
+ std::queue* DealMsgQueue;
+ CRITICAL_SECTION* gMsgQueueSection;
+ bool IsRun;
+ void operator()() {
+ run();
+ }
+ void run();
+public:
+ c_SubCallBack(char *lpMould,char *lpClass);
+ c_SubCallBack();
+ ~c_SubCallBack();
+
+ int initInstance();
+ unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv)
+ {
+ return 0;
+ }
+
+ unsigned long FUNCTION_CALL_MODE AddRef()
+ {
+ return 0;
+ }
+
+ unsigned long FUNCTION_CALL_MODE Release()
+ {
+ return 0;
+ }
+ void FUNCTION_CALL_MODE OnReceived(CSubscribeInterface *lpSub,int subscribeIndex, const void *lpData, int nLength,LPSUBSCRIBE_RECVDATA lpRecvData);
+ void FUNCTION_CALL_MODE OnRecvTickMsg(CSubscribeInterface *lpSub,int subscribeIndex,const char* TickMsgInfo);
+};
+
+class c_CSubscribeInterface
+{
+private:
+ CSubscribeInterface* lpSubscribe;
+public:
+ c_CSubscribeInterface(CSubscribeInterface* lpSub);
+ ~c_CSubscribeInterface();
+ int SubscribeTopic(c_CSubscribeParamInterface* lpSubscribeParamInter ,unsigned int uiTimeout,c_IF2UnPacker** lppBizUnPack=NULL,c_IF2Packer* lpBizPack=NULL);
+ int CancelSubscribeTopic(int subscribeIndex);
+ int CancelSubscribeTopicEx(char* topicName,CFilterInterface* lpFilterInterface);
+ void GetSubcribeTopic(c_IF2Packer* lpPack);
+ void Release();
+};
+
+class c_CCallbackInterface: public CCallbackInterface
+{
+private:
+ PyObject* pModuleT2;
+ PyObject* pT2Class;
+ PyObject* pModule;
+ PyObject* pDict;
+ PyObject* pClass;
+ PyObject* pObject;
+ //PyObject* pConnectFunc;
+ //PyObject* pSafeConnectFunc;
+ PyObject* pRegisterFunc;
+ PyObject* pCloseFunc;
+ //PyObject* pSendFunc;
+ //PyObject* pReceivedBizFunc;
+ //PyObject* pReceivedBizExFunc;
+ PyObject* pReceivedBizMsgFunc;
+ PyGILState_STATE state;
+ char sMouldName[50];
+ char sClassName[50];
+ HANDLE EventHandle[2];
+ std::thread* Thread;
+ std::queue* DealMsgQueue;
+ CRITICAL_SECTION* gMsgQueueSection;
+ bool IsRun;
+ void operator()() {
+ run();
+ }
+ void run();
+public:
+ c_CCallbackInterface(char* sMould,char* sClass);
+ c_CCallbackInterface();
+ ~c_CCallbackInterface();
+ int InitInstance();
+ unsigned long FUNCTION_CALL_MODE QueryInterface(const char *iid, IKnown **ppv)
+ {
+ return 0;
+ }
+
+ unsigned long FUNCTION_CALL_MODE AddRef()
+ {
+ return 0;
+ }
+
+ unsigned long FUNCTION_CALL_MODE Release()
+ {
+ return 0;
+ }
+ void FUNCTION_CALL_MODE OnConnect(CConnectionInterface *lpConnection);
+ void FUNCTION_CALL_MODE OnSafeConnect(CConnectionInterface *lpConnection);
+ void FUNCTION_CALL_MODE OnRegister(CConnectionInterface *lpConnection);
+ void FUNCTION_CALL_MODE OnClose(CConnectionInterface *lpConnection);
+ void FUNCTION_CALL_MODE OnSent(CConnectionInterface *lpConnection, int hSend, void *reserved1, void *reserved2, int nQueuingData);
+ void FUNCTION_CALL_MODE Reserved1(void *a, void *b, void *c, void *d);
+ void FUNCTION_CALL_MODE Reserved2(void *a, void *b, void *c, void *d);
+ int FUNCTION_CALL_MODE Reserved3();
+ void FUNCTION_CALL_MODE Reserved4();
+ void FUNCTION_CALL_MODE Reserved5();
+ void FUNCTION_CALL_MODE Reserved6();
+ void FUNCTION_CALL_MODE Reserved7();
+ void FUNCTION_CALL_MODE OnReceivedBiz(CConnectionInterface *lpConnection, int hSend, const void *lpUnPackerOrStr, int nResult);
+ void FUNCTION_CALL_MODE OnReceivedBizEx(CConnectionInterface *lpConnection, int hSend, LPRET_DATA lpRetData, const void *lpUnpackerOrStr, int nResult);
+ void FUNCTION_CALL_MODE OnReceivedBizMsg(CConnectionInterface *lpConnection, int hSend, IBizMessage* lpMsg);
+};
+
+class c_CConnectionInterface
+{
+private:
+ CConnectionInterface* lpConnect;
+public:
+ c_CConnectionInterface(C_CConfigInterface* lpConfig);
+ ~c_CConnectionInterface();
+ int Connect(unsigned int uiTimeout);
+ int Close();
+ char * GetServerAddress(int *lpPort);
+ int GetStatus();
+ int GetServerLoad();
+ char * GetErrorMsg(int nErrorCode);
+ int GetConnectError();
+ char* GetRealAddress();
+ char* GetSelfAddress();
+ char* GetSelfMac();
+ c_CSubscribeInterface* NewSubscriber(c_SubCallBack *lpCallback,char* SubScribeName,int iTimeOut,
+ int iInitRecvQLen=INIT_RECVQ_LEN,int iStepRecvQLen=STEP_RECVQ_LEN);
+ c_IF2UnPacker* GetTopic(int byForce,int iTimeOut);
+ char* GetMCLastError();
+ int Create2BizMsg(c_CCallbackInterface *lpCallback);
+ int SendBizMsg(c_IBizMessage* lpMsg,int nAsy = 0);
+ int RecvBizMsg(int hSend, c_IBizMessage* lpMsg, unsigned uiTimeout = 1000, unsigned uiFlag = 0);
+ char * GetLastAnsError(int bAsyError = 0);
+ void Release();
+};
+
+
+
+
+#endif
\ No newline at end of file
diff --git a/vnpy/api/t2sdk/t2sdk.dll b/vnpy/api/t2sdk/t2sdk.dll
new file mode 100644
index 0000000000..06ee784b59
Binary files /dev/null and b/vnpy/api/t2sdk/t2sdk.dll differ
diff --git a/vnpy/api/tap/.gitignore b/vnpy/api/tap/.gitignore
deleted file mode 100644
index 15338c00be..0000000000
--- a/vnpy/api/tap/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-vntap.lib
-
-
diff --git a/vnpy/api/tap/__init__.py b/vnpy/api/tap/__init__.py
index e69de29bb2..30a3f84518 100644
--- a/vnpy/api/tap/__init__.py
+++ b/vnpy/api/tap/__init__.py
@@ -0,0 +1,3 @@
+from .vntapmd import MdApi
+from .vntaptd import TdApi
+from .tap_constant import *
\ No newline at end of file
diff --git a/vnpy/api/tap/error_codes.py b/vnpy/api/tap/error_codes.py
deleted file mode 100644
index d4ec6577a0..0000000000
--- a/vnpy/api/tap/error_codes.py
+++ /dev/null
@@ -1,288 +0,0 @@
-error_map = {
- 0: None,
- -1: "连接服务失败",
- -2: "链路认证失败",
- -3: "主机地址不可用",
- -4: "发送数据错误",
- -5: "测试编号不合法",
- -6: "没准备好测试网络",
- -7: "当前网络测试还没结束",
- -8: "没用可用的接入前置",
- -9: "数据路径不可用",
- -10: "重复登录",
- -11: "内部错误",
- -12: "上一次请求还没有结束",
- -13: "输入参数非法",
- -14: "授权码不合法",
- -15: "授权码超期",
- -16: "授权码类型不匹配",
- -17: "API还没有准备好",
- -18: "UDP端口监听失败",
- -19: "UDP正在监听",
- -20: "接口未实现",
- -21: "每次登陆只允许调用一次",
- -22: "超过下单频率。",
- -10000: "输入数据为NULL",
- -10001: "输入错误的:TAPIYNFLAG",
- -10002: "输入错误的:TAPILOGLEVEL",
- -10003: "输入错误的:TAPICommodityType",
- -10004: "输入错误的:TAPICallOrPutFlagType",
- -12001: "输入错误的:TAPIAccountType",
- -12003: "输入错误的:TAPIAccountState",
- -12004: "输入错误的:TAPIAccountFamilyType",
- -12005: "输入错误的:TAPIOrderTypeType",
- -12006: "输入错误的:TAPIOrderSourceType",
- -12007: "输入错误的:TAPITimeInForceType",
- -12008: "输入错误的:TAPISideType",
- -12009: "输入错误的:TAPIPositionEffectType",
- -12010: "输入错误的:TAPIHedgeFlagType",
- -12011: "输入错误的:TAPIOrderStateType",
- -12012: "输入错误的:TAPICalculateModeType",
- -12013: "输入错误的:TAPIMatchSourceType",
- -12014: "输入错误的:TAPIOpenCloseModeType",
- -12015: "输入错误的:TAPIFutureAlgType",
- -12016: "输入错误的:TAPIOptionAlgType",
- -12017: "输入错误的:TAPIBankAccountLWFlagType",
- -12021: "输入错误的:TAPIMarginCalculateModeType",
- -12022: "输入错误的:TAPIOptionMarginCalculateModeType",
- -12023: "输入错误的:TAPICmbDirectType",
- -12024: "输入错误的:TAPIDeliveryModeType",
- -12025: "输入错误的:TAPIContractTypeType",
- -12035: "输入错误的:TAPITacticsTypeType",
- -12036: "输入错误的:TAPIORDERACT",
- -12041: "输入错误的:TAPITriggerConditionType",
- -12042: "输入错误的:TAPITriggerPriceTypeType",
- -12043: "输入错误的:TAPITradingStateType",
- -12044: "输入错误的:TAPIMarketLevelType",
- -12045: "输入错误的:TAPIOrderQryTypeType",
- 1: "主动断开",
- 2: "被动断开",
- 3: "读错误",
- 4: "写错误",
- 5: "缓冲区满",
- 6: "异步操作错误",
- 7: "解析数据错误",
- 8: "连接超时",
- 9: "初始化失败",
- 10: "已经连接",
- 11: "工作线程已结束",
- 12: "操作正在进行,请稍后重试",
- 13: "心跳检测失败",
- 10001: "登录过程执行错误",
- 10002: "登录用户不存在",
- 10003: "需要进行动态认证",
- 10004: "登录用户未授权",
- 10005: "登录模块不正确",
- 10006: "需要强制修改密码",
- 10007: "登录状态禁止登陆",
- 10008: "登录密码不正确",
- 10009: "没有该模块登录权限",
- 10010: "登录数量超限",
- 10011: "登录用户不在服务器标识下可登录用户列表中",
- 10012: "登录用户已被冻结",
- 10013: "密码错误,用户冻结",
- 10014: "客户状态不允许登录",
- 10015: "需要进行二次认证",
- 10016: None,
- 10017: None,
- 10018: "登录用户密码超过有效天数",
- 10101: "登录用户信息查询失败",
- 11001: "数据库操作失败",
- 11501: "登录用户下属所有资金账号查询失败",
- 11701: "登录用户密码修改失败",
- 11702: "登录用户密码修改失败——原始密码错误",
- 11703: "登录用户密码修改失败——不能与前n次密码相同",
- 11704: "新密码不符合密码复杂度要求",
- 20201: "资金账号信息查询失败",
- 20701: "客户交易编码查询失败",
- 22801: "合约信息查询失败",
- 22901: "特殊期权标的查询失败",
- 25501: "品种委托类型查询失败",
- 25601: "品种委托时间有效性查询失败",
- 28901: "用户下单频率查询失败",
- 60001: "资金账号不存在",
- 60002: "资金账号状态不正确",
- 60003: "资金账号交易中心不一致",
- 60004: "资金账号无期权交易权限",
- 60005: "资金账号无品种交易权限",
- 60006: "资金账号无开仓权限",
- 60007: "资金账号风控项检查失败",
- 60011: "下单无效的合约",
- 60021: "客户权限禁止交易",
- 60022: "客户品种分组禁止交易",
- 60023: "客户合约特设禁止交易",
- 60024: "系统权限禁止交易",
- 60031: "持仓量超过最大限制",
- 60032: "下单超过单笔最大量",
- 60033: "下单合约无交易路由",
- 60034: "委托价格超出偏离范围",
- 60035: "超过GiveUp最大持仓量",
- 60036: "下单自动审核失败",
- 60037: "LME未准备就绪",
- 60038: "平仓方式错误",
- 60039: "下单对应的父账号资金不足",
- 60040: "互换单的合约格式错误",
- 60051: "下单资金不足",
- 60052: "手续费参数错误",
- 60053: "保证金参数错误",
- 60061: "撤单无此系统号",
- 60062: "此状态不允许撤单",
- 60063: "录单不允许撤单",
- 60071: "此状态不允许改单",
- 60072: "人工单不允许改单",
- 60081: "已删除报单不能转移",
- 60082: "人工单不允许改单",
- 60091: "录单重复",
- 60092: "保证金参数错误",
- 60100: "操作账号只可查询",
- 60101: "合约行情价格修改失败",
- 60102: "即使子帐号又是做市商不能应价",
- 60103: "下单找不到交易编码",
- 60104: "操作账号只可开仓",
- 60105: "操作账号没有上期挂单查询权限",
- 60106: "限期有效单不能小于当前交易日",
- 60107: "该编码不允许申请或拆分组合",
- 60108: "非本服务器标记下的账号不允许操作",
- 60109: "行权或弃权量超过可用量",
- 60110: "没有订单审核权限",
- 60111: "下单超过上手单笔最大量",
- 60115: "非大连应价单不允许两笔委托量不一致",
- 60117: "申请不允许重复提交",
- 60118: "超过账号下单频率限制",
- 60119: "组合表不存在的组合方向或投保标志",
- 61001: "订单操作频率过高",
- 61002: "委托查询返回前不能进行下次查询",
- 72001: "超过行情最大总订阅数",
- 72002: "超过该交易所行情最大订阅数",
- 72101: "没有该行情的订阅权限",
- 72102: "没有该交易所下行情的订阅权限",
- 72103: "品种不存在",
- 72104: "合约可能不存在",
- 83001: "不支持的行情协议",
- 14001: "二次验证失败",
- 14002: "二次验证超时",
- 11000: "数据库连接失败",
- 11002: "不允许一对多",
- 11003: "删除失败-存在关联信息,",
- 11004: "删除分组失败-分组有下属或在操作员下属中",
- 12001: "登录用户密码修改失败-原始密码错误",
- 12002: "登录用户密码修改失败-不能与前n次密码相同",
- 12003: "登录用户密码修改失败-新密码不符合密码复杂度要求",
- 13001: "一个币种组只能设置一个基币",
- 13002: "基币只能是美元或港币",
- 60012: "LME未准备就绪",
- 60013: "不支持的下单类型",
- 60014: "错误的埋单类型",
- 60015: "不合法的委托类型",
- 60025: "客户权限只可平仓",
- 60026: "客户合约特设只可平仓",
- 60027: "系统权限只可平仓",
- 60028: "只可平仓提前天数限制只可平仓",
- 60029: "客户品种风控权限禁止交易",
- 60030: "客户品种风控权限只可平仓",
- 60041: "未登录网关",
- 60042: "未找到网关信息",
- 60054: "总基币资金不足",
- 60055: "超过保证金额度",
- 60056: "总基币超过开仓比例限制",
- 60057: "独立币种组超过开仓比例限制",
- 60058: "风险阵列参数错误",
- 60073: "风险报单不允许改单",
- 60074: "成交量大于改单量",
- 60075: "预埋单不允许改单",
- 60112: "下单超过上手最大持仓量",
- 60121: "开平方式错误",
- 60122: "委托平仓持仓不足",
- 60123: "成交平仓失败",
- 60131: "未找到本地委托",
- 60132: "与网关断开连接",
- 60141: "录单成交重复",
- 60142: "录单成交未找到对应委托",
- 60143: "录单成交合约不存在",
- 60144: "录单成交参数错误",
- 60145: "录单成交委托状态错误",
- 60151: "成交删除未找到成交",
- 60152: "此状态成交不可删",
- 60161: "不允许录入此状态订单",
- 60162: "错误的修改订单请求",
- 60163: "订单不可删,存在对应成交",
- 60164: "不合法的委托状态",
- 60165: "此状态不允许订单转移",
- 60166: "订单不允许删除",
- 60171: "做市商双边撤单未找到委托",
- 60172: "做市商双边撤单客户不一致",
- 60173: "做市商双边撤单品种不一致",
- 60174: "做市商双边撤单合约不一致",
- 60175: "做市商双边撤单买卖方向相同",
- 60176: "做市商双边撤单买卖方向错误",
- 60177: "做市商单边检查未通过",
- 60181: "埋单激活失败,订单未找到",
- 60182: "埋单激活失败,非有效状态",
- 80001: "网关未就绪,未连接上手",
- 80002: "品种错误",
- 80003: "合约错误",
- 80004: "报单字段有误",
- 80005: "价格不合法",
- 80006: "数量不合法",
- 80007: "报单类型不合法",
- 80008: "委托模式不合法",
- 80009: "委托不存在(改单、撤单)",
- 80010: "发送报单失败",
- 80011: "被上手拒绝",
- 90001: "前置不允许该模块登录",
- 90002: "一次请求太多数据",
- 90003: "前置没有所要数据",
- 90004: "所查询的操作员信息不存在",
- 90011: "前置与交易断开",
- 90012: "前置与管理断开",
- 90021: "下属资金账号不存在",
- 90022: "该操作员不允许交易",
- 90023: "查询频率过快",
- 90024: "该授权不予许登录",
- 90025: "自成交验证不通过",
- -23: "查询频率太快。",
- -24: "不符合调用条件。",
- -25: "改单撤单时没有找到对应订单。",
- -26: "日志路径为空。",
- -27: "打开日志文件失败",
- -28: "没有交易员登录权限",
- -29: "没有订单录入或者成交录入",
- -30: "没有订单修改和订单删除权限,成交删除权限",
- -31: "没有订单转移权限",
- -32: "成交录入时系统号为空",
- -33: "成交删除时成交号为空。",
- -34: "成交删除时没有找到对应的成交",
- -35: "订单修改时客户账号变动。",
- -36: "订单转移时客户账号没有变动",
- -37: "修改的电话密码位数不对或者包含特殊字符。",
- -38: "未绑定的二次认证信息",
- -39: "二次认证有效期内不能再申请二次认证码",
- -40: "没有设置客户密码的权限。",
- -41: "风险保单单客户无法撤销或更改",
- -42: "改单是客户账号填写与订单客户账号不一致",
- -11001: "输入错误的:TAPIBucketDateFlag",
- -11002: "输入错误的:TAPIHisQuoteType",
- -12002: "输入错误的:TAPIUserTypeType",
- -12018: "输入错误的:TAPIBankAccountStateType",
- -12019: "输入错误的:TAPIBankAccountSwapStateType",
- -12020: "输入错误的:TAPIBankAccountTransferStateType",
- -12026: "输入错误的:TAPIPartyTypeType",
- -12027: "输入错误的:TAPIPartyCertificateTypeType",
- -12028: "输入错误的:TAPIMsgReceiverType",
- -12029: "输入错误的:TAPIMsgTypeType",
- -12030: "输入错误的:TAPIMsgLevelType",
- -12031: "输入错误的:TAPITransferDirectType",
- -12032: "输入错误的:TAPITransferStateType",
- -12033: "输入错误的:TAPITransferTypeType",
- -12034: "输入错误的:TAPITransferDeviceIDType",
- -12037: "输入错误的:TAPIBillTypeType",
- -12038: "输入错误的:TAPIBillFileTypeType",
- -12039: "输入错误的:TAPIOFFFlagType",
- -12040: "输入错误的:TAPICashAdjustTypeType",
- -12046: "输入错误的: ClientID,ClientID包含特殊字符。",
- -13001: "历史行情查询参数不合法",
- -13002: "价格和数量中包含NAN或者INF不合法的数值",
- -12047: "输入错误的到期日",
- -12048: "错误的密码类型",
- -12049: "错误的结算数据类型",
-}
diff --git a/vnpy/api/tap/generate_error_map.py b/vnpy/api/tap/generate_error_map.py
deleted file mode 100644
index 5c48c470d7..0000000000
--- a/vnpy/api/tap/generate_error_map.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from typing import Dict
-
-import black
-
-from autocxxpy.core.cxxparser import CxxFileParser
-
-parser = CxxFileParser(
- files=["iTapAPIError.h",
- "TapAPIError.h",
- ],
- include_paths=['vntap/include']
-)
-result = parser.parse()
-error_map: Dict[int, str] = {}
-for v in result.g.variables.values():
- error_map[v.value] = v.brief_comment
-for v in result.g.namespaces['ITapTrade'].variables.values():
- error_map[v.value] = v.brief_comment
-
-result = f'error_map = {repr(error_map)}'
-
-output_file = 'error_codes.py'
-with open(output_file, "wt", encoding='utf-8') as f:
- f.write(result)
-black.main([output_file])
diff --git a/vnpy/api/tap/generate_tap.sh b/vnpy/api/tap/generate_tap.sh
deleted file mode 100644
index 5ef84f5791..0000000000
--- a/vnpy/api/tap/generate_tap.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env bash
-c2py generate \
- vntap \
- iTapTradeAPI.h TapQuoteAPI.h TapAPIError.h iTapAPIError.h \
- -I vntap/include \
- -A custom/custom_wrappers.hpp\
- --output-dir vntap/generated_files \
- --copy-c2py-includes vntap/include \
- --pyi-output-dir . \
- \
- --no-clear-pyi-output-dir \
- \
- --output-arg-pattern \
- "(.*API::.*(sessionID$|.*ClientBuyOrderNo$|.*ClientSellOrderNo$|.*ClientOrderNo$))|(.*Result)" \
- \
- --no-callback-pattern \
- ".*API::.*" \
- --no-transform-pattern \
- ".*Notify::On.*" \
- \
- --string-encoding-windows .936 \
- --string-encoding-linux zh_CN.GB18030 \
- \
- --enforce-version 0.5.4
-
-# python generate_error_map.py
diff --git a/vnpy/api/tap/generator/generate_api_commdef.py b/vnpy/api/tap/generator/generate_api_commdef.py
new file mode 100644
index 0000000000..13ec7d8744
--- /dev/null
+++ b/vnpy/api/tap/generator/generate_api_commdef.py
@@ -0,0 +1,199 @@
+""""""
+import importlib
+
+
+class CommenTypeGenerator:
+ """DataType生成器"""
+
+ def __init__(self, filename: str, prefix: str, name: str) -> None:
+ """Constructor"""
+ self.filename: str = filename
+ self.prefix: str = prefix
+ self.name: str = name
+ self.typedefs = {}
+
+ def load_constant(self):
+ """"""
+ module_name = f"{self.prefix}_{self.name}_commen_typedef"
+ module = importlib.import_module(module_name)
+
+ for name in dir(module):
+ if "__" not in name:
+ self.typedefs[name] = getattr(module, name)
+
+ def run(self) -> None:
+ """主函数"""
+ self.f_cpp = open(self.filename, "r", encoding="UTF-8")
+ self.f_define = open(f"{self.prefix}_{self.name}_commen_constant.py", "w", encoding="UTF-8")
+ self.f_typedef = open(f"{self.prefix}_{self.name}_commen_typedef.py", "w", encoding="UTF-8")
+ self.f_struct = open(f"{self.prefix}_{self.name}_commen_struct.py", "w", encoding="UTF-8")
+
+ self.add_supplement()
+
+ for line in self.f_cpp:
+ self.process_line(line)
+
+ self.f_cpp.close()
+ self.f_define.close()
+ self.f_typedef.close()
+
+ self.load_constant()
+ self.process_struct()
+
+ self.f_cpp.close()
+ self.f_struct.close()
+
+ print(f"{self.name}_CommenType生成完毕")
+
+ def process_struct(self) -> None:
+ f_cpp_struct = open(self.filename, "r", encoding="UTF-8")
+ for line in f_cpp_struct:
+ line = line.replace(";", "")
+ line = line.replace("\n", "")
+
+ if "struct" in line:
+ self.process_declare(line)
+ elif "{" in line:
+ self.process_start(line)
+ elif line.startswith("}") and self.name == "md":
+ self.process_end(line)
+ elif line.startswith(" }") and self.name == "td":
+ self.process_end(line)
+ elif "///<" in line:
+ self.process_member(line)
+
+ f_cpp_struct.close()
+
+ def process_declare(self, line: str):
+ """处理声明"""
+ words = line.split(" ")
+ name = words[-1]
+ end = "{"
+
+ new_line = f"{name} = {end}\n"
+ self.f_struct.write(new_line)
+
+ def process_start(self, line: str):
+ """处理开始"""
+ pass
+
+ def process_end(self, line: str):
+ """处理结束"""
+ new_line = "}\n\n"
+ self.f_struct.write(new_line)
+
+ def process_member(self, line: str) -> None:
+ sector = line.split("///<")[0]
+ words = sector.split("\t")
+ words = [word for word in words if word != ""]
+
+ if len(words) == 1:
+ words = words[0].split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[1].strip()
+ py_type = self.typedefs.get(words[0].strip(), "dict")
+ new_line = f" \"{name}\": \"{py_type}\",\n"
+ self.f_struct.write(new_line)
+
+ def process_line(self, line: str) -> None:
+ """处理每行"""
+ line = line.replace("\n", "")
+ line = line.replace(";", "")
+
+ # MD
+ if self.name == "md":
+ if line.startswith("typedef char"):
+ self.process_char_md(line)
+ elif line.startswith("const"):
+ self.process_const_md(line)
+ # TD
+ elif self.name == "td":
+ if line.startswith(" typedef char"):
+ self.process_char_td(line)
+ elif line.startswith(" const"):
+ self.process_const_td(line)
+
+ def process_char_md(self, line: str) -> None:
+ """处理类型定义"""
+ if "\t\t\t\t" in line:
+ name = line.split("\t\t\t\t")[1]
+ new_line = f"{name} = \"char\"\n"
+ else:
+ name = line.split("\t")[1].split("[")[0]
+ new_line = f"{name} = \"string\"\n"
+
+ self.f_typedef.write(new_line)
+
+ def process_char_td(self, line: str) -> None:
+ words = line.split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[-1]
+
+ if "[" in name:
+ name = name.split("[")[0]
+ new_line = f"{name} = \"string\"\n"
+ else:
+ new_line = f"{name} = \"char\"\n"
+
+ self.f_typedef.write(new_line)
+
+ def process_const_md(self, line: str) -> None:
+ """"""
+ sectors = line.split("=")
+ value = sectors[1].replace("\'", "\"").strip()
+
+ words = sectors[0].split("\t")
+ words = [word for word in words if word != ""]
+ name = words[1].strip()
+
+ new_line = f"{name} = {value}\n"
+ self.f_define.write(new_line)
+
+ def process_const_td(self, line: str):
+ sectors = line.split("=")
+ value = sectors[1].replace("\'", "\"").strip()
+
+ words = sectors[0].split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[-1].strip()
+
+ new_line = f"{name} = {value}\n"
+ self.f_define.write(new_line)
+
+ def add_supplement(self):
+ self.f_typedef.write("TAPIINT32 = \"int\"\n")
+ self.f_typedef.write("TAPIUINT32 = \"unsigned int\"\n")
+ self.f_typedef.write("TAPIINT64 = \"long long\"\n")
+ self.f_typedef.write("TAPIUINT64 = \"unsigned long long\"\n")
+ self.f_typedef.write("TAPIUINT16 = \"unsigned short\"\n")
+ self.f_typedef.write("TAPIUINT8 = \"unsigned char\"\n")
+ self.f_typedef.write("TAPIREAL64 = \"double\"\n")
+
+ if self.name == "md":
+ self.f_typedef.write("TAPIYNFLAG = \"char\"\n")
+ self.f_typedef.write("TAPILOGLEVEL = \"char\"\n")
+ self.f_typedef.write("TAPICommodityType = \"char\"\n")
+ self.f_typedef.write("TAPICallOrPutFlagType = \"char\"\n")
+
+ self.f_typedef.write("TAPIMACTYPE = \"string\"\n")
+ self.f_typedef.write("TAPISecondSerialIDType = \"string\"\n")
+ self.f_typedef.write("TAPIClientIDType = \"string\"\n")
+
+ elif self.name == "td":
+ self.f_typedef.write("TAPIYNFLAG = \"char\"\n")
+ self.f_typedef.write("TAPIPasswordType = \"char\"\n")
+ self.f_typedef.write("TAPILOGLEVEL = \"char\"\n")
+ self.f_typedef.write("TAPIOptionType = \"char\"\n")
+ self.f_typedef.write("TAPICommodityType = \"char\"\n")
+ self.f_typedef.write("TAPICallOrPutFlagType = \"char\"\n")
+
+
+if __name__ == "__main__":
+ md_generator = CommenTypeGenerator("../include/tap/TapAPICommDef.h", "tap", "md")
+ md_generator.run()
+
+ td_generator = CommenTypeGenerator("../include/tap/iTapAPICommDef.h", "tap", "td")
+ td_generator.run()
diff --git a/vnpy/api/tap/generator/generate_api_error.py b/vnpy/api/tap/generator/generate_api_error.py
new file mode 100644
index 0000000000..25b63f931e
--- /dev/null
+++ b/vnpy/api/tap/generator/generate_api_error.py
@@ -0,0 +1,57 @@
+""""""
+
+
+class ErrorTypeGenerator:
+ """DataType生成器"""
+
+ def __init__(self, filename: str, prefix: str, name: str) -> None:
+ """Constructor"""
+ self.filename: str = filename
+ self.prefix: str = prefix
+ self.name: str = name
+
+ def run(self) -> None:
+ """主函数"""
+ self.f_cpp = open(self.filename, "r", encoding="UTF-8")
+ self.f_define = open(f"{self.prefix}_{self.name}_error_constant.py", "w", encoding="UTF-8")
+
+ for line in self.f_cpp:
+ self.process_line(line)
+
+ self.f_cpp.close()
+ self.f_define.close()
+
+ print(f"{self.name}_ErrorType生成完毕")
+
+ def process_line(self, line: str) -> None:
+ """处理每行"""
+ line = line.replace("\n", "")
+ line = line.replace(";", "")
+
+ # MD
+ if self.name == "md":
+ if line.startswith("const int"):
+ self.process_int(line)
+ # TD
+ elif self.name == "td":
+ if line.startswith(" const int"):
+ self.process_int(line)
+
+ def process_int(self, line: str) -> None:
+ """处理类型定义"""
+ sectors = line.split("=")
+ value = sectors[1].strip()
+
+ words = sectors[0].split(" ")
+ words = [word for word in words if word != ""]
+ name = words[-1].strip()
+ new_line = f"{name} = {value}\n"
+ self.f_define.write(new_line)
+
+
+if __name__ == "__main__":
+ md_generator = ErrorTypeGenerator("../include/tap/TapAPIError.h", "tap", "md")
+ md_generator.run()
+
+ td_generator = ErrorTypeGenerator("../include/tap/iTapAPIError.h", "tap", "td")
+ td_generator.run()
diff --git a/vnpy/api/tap/generator/generate_api_functions.py b/vnpy/api/tap/generator/generate_api_functions.py
new file mode 100644
index 0000000000..a1886beff4
--- /dev/null
+++ b/vnpy/api/tap/generator/generate_api_functions.py
@@ -0,0 +1,435 @@
+""""""
+import importlib
+
+
+class ApiGenerator:
+ """API生成器"""""
+
+ def __init__(self, filename: str, prefix: str, name: str, class_name: str):
+ """Constructor"""
+ self.filename = filename
+ self.prefix = prefix
+ self.name = name
+ self.class_name = class_name
+
+ self.callbacks = {}
+ self.functions = {}
+ self.lines = {}
+
+ self.structs = {}
+ self.typedefs = {}
+ self.load_constant()
+ self.load_struct()
+
+ def load_constant(self) -> None:
+ """"""
+ if self.name == "md":
+ module_names = ["tap_md_commen_typedef", "tap_md_data_typedef"]
+ elif self.name == "td":
+ module_names = ["tap_td_commen_typedef", "tap_td_data_typedef"]
+
+ for module_name in module_names:
+ module = importlib.import_module(module_name)
+
+ for name in dir(module):
+ if "__" not in name:
+ self.typedefs[name] = getattr(module, name)
+
+ def load_struct(self):
+ """加载Struct"""
+ module_names = ["tap_md_data_struct", "tap_md_commen_struct", "tap_td_data_struct", "tap_td_commen_struct"]
+
+ for module_name in module_names:
+ module = importlib.import_module(module_name)
+
+ for name in dir(module):
+ if "__" not in name:
+ self.structs[name] = getattr(module, name)
+
+ def run(self):
+ """运行生成"""
+ self.f_cpp = open(self.filename, "r", encoding="UTF-8")
+
+ for line in self.f_cpp:
+ self.process_line(line)
+
+ self.f_cpp.close()
+ # print("self.callbacks=",self.callbacks,"\n\n")
+ # print("self.functions=", self.functions,"\n\n")
+ # print("self.lines=", self.lines,"\n\n")
+
+ # print("self.structs=", self.structs,"\n\n")
+ # print("self.typedefs=", self.typedefs,"\n\n")
+
+ self.generate_header_define()
+ self.generate_header_process()
+ self.generate_header_on()
+ self.generate_header_function()
+
+ self.generate_source_task()
+ self.generate_source_switch()
+ self.generate_source_process()
+ self.generate_source_function()
+ self.generate_source_on()
+ self.generate_source_module()
+
+ print(f"{self.name}_API生成成功")
+
+ def process_line(self, line: str):
+ """处理每行"""
+ line = line.replace(";", "")
+ line = line.replace("\n", "")
+ line = line.replace("\t", "")
+ line = line.replace("{}", "")
+
+ if "virtual void TAP_CDECL On" in line:
+ self.process_callback(line)
+ elif "virtual ITapTrade::TAPIINT32 TAP_CDECL Qry" in line:
+ self.process_function(line)
+ elif "virtual TAPIINT32 TAP_CDECL Qry" in line:
+ self.process_function(line)
+
+ def process_callback(self, line: str):
+ """处理回掉函数"""
+ name = line[line.index("On"):line.index("(")]
+ line = line.replace(" ", "")
+ new_line = self.standard_format(line)
+ self.lines[name] = new_line
+
+ d = self.generate_arg_dict(line)
+ self.callbacks[name] = d
+
+ def standard_format(self, line: str):
+ """"""
+ line = line.split("=")[0]
+ line = line.replace("virtual void TAP_CDECL", "virtual void")
+ header = line.split("(")[0]
+
+ args_str = line[line.index("(") + 1:line.index(")")]
+ if not args_str:
+ f_content = ""
+ else:
+ args = args_str.split(",")
+ content = ""
+ for arg in args:
+ words = arg.split(" ")
+ if len(words) > 2:
+ tap_type = words[-2]
+ name = words[-1]
+
+ if "::" in tap_type:
+ tap_type = tap_type.split("::")[1]
+
+ cpp_type = self.typedefs.get(tap_type, "dict")
+ if cpp_type == "dict":
+ cpp_type = tap_type
+
+ item = f"{cpp_type} {name}, "
+ content = content + item
+ elif len(words) == 2:
+ tap_type = words[0]
+ name = words[1]
+
+ if "::" in tap_type:
+ tap_type = tap_type.split("::")[1]
+ cpp_type = self.typedefs[tap_type]
+
+ item = f"{cpp_type} {name}, "
+ content = content + item
+ f_content = content[:-2]
+
+ new_line = f"{header}({f_content})"
+ return new_line
+
+ def process_function(self, line: str):
+ """处理主动函数"""
+ name = line[line.index("Qry"):line.index("(")]
+
+ d = self.generate_arg_dict(line)
+ self.functions[name] = d
+
+ def generate_arg_dict(self, line: str):
+ """生成参数字典"""
+ args_str = line[line.index("(") + 1:line.index(")")]
+ if not args_str:
+ return {}
+ args = args_str.split(",")
+
+ d = {}
+ for arg in args:
+ words = arg.split(" ")
+ words = [word for word in words if word]
+
+ tap_type = words[-2].replace("*", "")
+ name = words[-1].replace("*", "")
+ if "::" in tap_type:
+ tap_type = tap_type.split("::")[1]
+
+ cpp_type = self.typedefs.get(tap_type, tap_type)
+ if cpp_type == "dict":
+ cpp_type = tap_type
+ d[name] = cpp_type
+ return d
+
+ def generate_header_define(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_header_define.h"
+ with open(filename, "w") as f:
+ for n, name in enumerate(self.callbacks.keys()):
+ line = f"#define {name.upper()} {n}\n"
+ f.write(line)
+
+ def generate_header_process(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_header_process.h"
+ with open(filename, "w") as f:
+ for name in self.callbacks.keys():
+ name = name.replace("On", "process")
+ line = f"void {name}(Task *task);\n\n"
+ f.write(line)
+
+ def generate_header_on(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_header_on.h"
+ with open(filename, "w") as f:
+ for function_name, d in self.callbacks.items():
+ function_name = function_name.replace("On", "on")
+
+ args_list = []
+ for name, type_ in d.items():
+ if type_ == "unsigned int":
+ args_list.append("unsigned int session")
+ elif type_ == "int":
+ if name == "errorCode":
+ args_list.append("int error")
+ elif name == "reasonCode":
+ args_list.append("int reason")
+ else:
+ args_list.append(f"int {name}")
+ elif type_ == "char":
+ args_list.append("char last")
+ elif type_ == "string":
+ args_list.append(f"string {name}")
+ else:
+ args_list.append("const dict &data")
+
+ args_str = ", ".join(args_list)
+ line = f"virtual void {function_name}({args_str}) {{}};\n\n"
+
+ f.write(line)
+
+ def generate_header_function(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_header_function.h"
+ with open(filename, "w") as f:
+ for function_name, d in self.functions.items():
+ function_name = function_name.replace("Qry", "qry")
+
+ args_list = []
+ for name, type_ in d.items():
+ if type_ == "unsigned int":
+ args_list.append("unsigned int session")
+ else:
+ args_list.append("const dict &data")
+
+ args_str = ", ".join(args_list)
+ line = f"int {function_name}({args_str});\n\n"
+ f.write(line)
+
+ def generate_source_task(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_task.cpp"
+ with open(filename, "w") as f:
+ for name, d in self.callbacks.items():
+ line = self.lines[name]
+
+ f.write(line.replace("virtual void ",
+ f"void {self.class_name}::") + "\n")
+ f.write("{\n")
+ f.write("\tTask task = Task();\n")
+ f.write(f"\ttask.task_name = {name.upper()};\n")
+
+ for field, type_ in d.items():
+ if type_ == "unsigned int":
+ f.write(f"\ttask.task_id = {field};\n")
+ elif type_ == "int":
+ f.write(f"\ttask.task_int = {field};\n")
+ elif type_ == "char":
+ f.write(f"\ttask.task_last = {field};\n")
+ elif type_ == "string":
+ f.write(f"\ttask.task_string = {field};\n")
+ else:
+ f.write(f"\tif ({field})\n")
+ f.write("\t{\n")
+ f.write(f"\t\t{type_} *task_data = new {type_}();\n")
+ f.write(f"\t\t*task_data = *{field};\n")
+ f.write(f"\t\ttask.task_data = task_data;\n")
+ f.write("\t}\n")
+
+ f.write(f"\tthis->task_queue.push(task);\n")
+ f.write("};\n\n")
+
+ def generate_source_switch(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_switch.cpp"
+ with open(filename, "w") as f:
+ for name in self.callbacks.keys():
+ process_name = name.replace("On", "process")
+ f.write(f"case {name.upper()}:\n")
+ f.write("{\n")
+ f.write(f"\tthis->{process_name}(&task);\n")
+ f.write(f"\tbreak;\n")
+ f.write("}\n\n")
+
+ def generate_source_process(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_process.cpp"
+ with open(filename, "w") as f:
+ for name, d in self.callbacks.items():
+ process_name = name.replace("On", "process")
+ on_name = name.replace("On", "on")
+
+ f.write(
+ f"void {self.class_name}::{process_name}(Task *task)\n")
+ f.write("{\n")
+ if len(d.keys()) == 0:
+ f.write(f"\tthis->{on_name}();\n")
+ f.write("};\n\n")
+ else:
+ f.write("\tgil_scoped_acquire acquire;\n")
+ args = []
+ for field, type_ in d.items():
+ if type_ == "unsigned int":
+ args.append("task->task_id")
+ elif type_ == "int":
+ args.append("task->task_int")
+ elif type_ == "string":
+ args.append("task->task_string")
+ elif type_ == "char":
+ args.append("task->task_last")
+ else:
+ args.append("data")
+ f.write("\tdict data;\n")
+ f.write("\tif (task->task_data)\n")
+ f.write("\t{\n")
+ f.write(
+ f"\t\t{type_} *task_data = ({type_}*)task->task_data;\n")
+
+ struct_fields = self.structs[type_]
+ for struct_field, struct_type in struct_fields.items():
+ if struct_type == "string":
+ f.write(
+ f"\t\tdata[\"{struct_field}\"] = toUtf(task_data->{struct_field});\n")
+ else:
+ f.write(
+ f"\t\tdata[\"{struct_field}\"] = task_data->{struct_field};\n")
+
+ f.write("\t\tdelete task_data;\n")
+ f.write("\t}\n")
+
+ args_str = ", ".join(args)
+ f.write(f"\tthis->{on_name}({args_str});\n")
+ f.write("};\n\n")
+
+ def generate_source_function(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_function.cpp"
+ with open(filename, "w") as f:
+ for name, d in self.functions.items():
+ req_name = name.replace("Qry", "qry")
+
+ length = len(d.keys())
+ if length == 1:
+ f.write(f"int {self.class_name}::{req_name}(unsigned int session)\n")
+ f.write("{\n")
+ f.write(f"\tint i = this->api->{name}(session);\n")
+ f.write("\treturn i;\n")
+ f.write("};\n\n")
+ else:
+ type_ = list(d.values())[1]
+ f.write(
+ f"int {self.class_name}::{req_name}(unsigned int session, const dict &req)\n")
+ f.write("{\n")
+ f.write(f"\t{type_} myreq = {type_}();\n")
+ f.write("\tmemset(&myreq, 0, sizeof(myreq));\n")
+
+ struct_fields = self.structs[type_]
+ for struct_field, struct_type in struct_fields.items():
+ if struct_type == "string":
+ line = f"\tgetString(req, \"{struct_field}\", myreq.{struct_field});\n"
+ else:
+ line = f"\tget{struct_type.capitalize()}(req, \"{struct_field}\", &myreq.{struct_field});\n"
+ f.write(line)
+
+ f.write(f"\tint i = this->api->{name}(session, &myreq);\n")
+ f.write("\treturn i;\n")
+ f.write("};\n\n")
+
+ def generate_source_on(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_on.cpp"
+ with open(filename, "w") as f:
+ for name, d in self.callbacks.items():
+ on_name = name.replace("On", "on")
+
+ args = []
+ bind_args = ["void", self.class_name, on_name]
+ for field, type_ in d.items():
+ if type_ == "unsigned int":
+ args.append("unsigned int session")
+ bind_args.append("session")
+ elif type_ == "char":
+ args.append("char last")
+ bind_args.append("last")
+ elif type_ == "int":
+ if field == "errorCode":
+ args.append("int error")
+ bind_args.append("error")
+ else:
+ args.append(f"int {field}")
+ bind_args.append(f"{field}")
+ elif type_ == "string":
+ args.append(f"string {field}")
+ bind_args.append(f"{field}")
+ else:
+ args.append("const dict &data")
+ bind_args.append("data")
+
+ args_str = ", ".join(args)
+ bind_args_str = ", ".join(bind_args)
+
+ f.write(f"void {on_name}({args_str}) override\n")
+ f.write("{\n")
+ f.write("\ttry\n")
+ f.write("\t{\n")
+ f.write(f"\t\tPYBIND11_OVERLOAD({bind_args_str});\n")
+ f.write("\t}\n")
+ f.write("\tcatch (const error_already_set &e)\n")
+ f.write("\t{\n")
+ f.write(f"\t\tcout << e.what() << endl;\n")
+ f.write("\t}\n")
+ f.write("};\n\n")
+
+ def generate_source_module(self):
+ """"""
+ filename = f"{self.prefix}_{self.name}_source_module.cpp"
+ with open(filename, "w") as f:
+ for name in self.functions.keys():
+ name = name.replace("Qry", "qry")
+ f.write(f".def(\"{name}\", &{self.class_name}::{name})\n")
+
+ f.write("\n")
+
+ for name in self.callbacks.keys():
+ name = name.replace("On", "on")
+ f.write(f".def(\"{name}\", &{self.class_name}::{name})\n")
+
+ f.write(";\n")
+
+
+if __name__ == "__main__":
+ md_generator = ApiGenerator("../include/tap/TapQuoteAPI.h", "tap", "md", "MdApi")
+ md_generator.run()
+
+ td_generator = ApiGenerator("../include/tap/iTapTradeAPI.h", "tap", "td", "TdApi")
+ td_generator.run()
diff --git a/vnpy/api/tap/generator/generate_data_type.py b/vnpy/api/tap/generator/generate_data_type.py
new file mode 100644
index 0000000000..1277c7c5d7
--- /dev/null
+++ b/vnpy/api/tap/generator/generate_data_type.py
@@ -0,0 +1,183 @@
+""""""
+import importlib
+
+
+class DataTypeGenerator:
+ """DataType生成器"""
+
+ def __init__(self, filename: str, prefix: str, name: str) -> None:
+ """Constructor"""
+ self.filename: str = filename
+ self.prefix: str = prefix
+ self.name: str = name
+ self.typedefs = {}
+
+ def load_constant(self) -> None:
+ """"""
+ module_names = ["tap_td_commen_typedef", "tap_md_commen_typedef"]
+ for module_name in module_names:
+ module = importlib.import_module(module_name)
+
+ for name in dir(module):
+ if "__" not in name:
+ self.typedefs[name] = getattr(module, name)
+
+ def run(self) -> None:
+ """主函数"""
+ self.f_cpp = open(self.filename, "r", encoding="UTF-8")
+ if self.name == "td":
+ self.f_define = open(f"{self.prefix}_{self.name}_data_constant.py", "w", encoding="UTF-8")
+ self.f_typedef = open(f"{self.prefix}_{self.name}_data_typedef.py", "w", encoding="UTF-8")
+ self.f_struct = open(f"{self.prefix}_{self.name}_data_struct.py", "w", encoding="UTF-8")
+
+ self.load_constant()
+
+ for line in self.f_cpp:
+ self.process_line(line)
+
+ self.f_cpp.close()
+ if self.name == "td":
+ self.f_define.close()
+ self.f_typedef.close()
+ self.f_struct.close()
+
+ print(f"{self.name}_DataType生成完毕")
+
+ def process_line(self, line: str) -> None:
+ """处理每行"""
+ line = line.replace("\n", "")
+ line = line.replace(";", "")
+
+ # MD
+ if self.name == "md":
+ if line.startswith("typedef"):
+ self.process_typedef_md(line)
+ elif "struct" in line:
+ self.process_declare(line)
+ elif "{" in line:
+ self.process_start(line)
+ elif "}" in line and "@" not in line:
+ self.process_end(line)
+ elif "///<" in line:
+ self.process_member(line)
+ # TD
+ elif self.name == "td":
+ if line.startswith(" typedef"):
+ self.process_typedef_td(line)
+ elif line.startswith(" const"):
+ self.process_const(line)
+ elif "struct" in line:
+ self.process_declare(line)
+ elif line.startswith(" {"):
+ self.process_start(line)
+ elif line.startswith(" }"):
+ self.process_end(line)
+ elif "///<" in line:
+ self.process_member(line)
+ elif "#" not in line and "!" not in line and "=" not in line and "*" not in line and "(" not in line and "namespace" not in line and "TapTradeAPI" not in line and len(line) != 0:
+ self.process_special(line)
+
+ def process_special(self, line: str) -> None:
+ words = line.split(" ")
+ words = [word for word in words if word != ""]
+
+ if len(words) == 2 or len(words) == 3:
+ name = words[1]
+ if "//" in name:
+ name = name.split("//")[0]
+ if "[" in name:
+ name = name.split("[")[0]
+
+ type_ = words[0]
+ if "//" in type_:
+ type_ = type_.split("//")[1]
+ py_type = self.typedefs.get(type_, "dict")
+
+ new_line = f" \"{name}\": \"{py_type}\",\n"
+ self.f_struct.write(new_line)
+
+ def process_declare(self, line: str) -> None:
+ """处理声明"""
+ words = line.split(" ")
+ name = words[-1]
+ end = "{"
+
+ new_line = f"{name} = {end}\n"
+ self.f_struct.write(new_line)
+
+ def process_start(self, line: str):
+ """处理开始"""
+ pass
+
+ def process_end(self, line: str) -> None:
+ """处理结束"""
+ new_line = "}\n\n"
+ self.f_struct.write(new_line)
+
+ def process_member(self, line: str) -> None:
+ sector = line.split("///<")[0]
+ words = sector.split("\t")
+ words = [word for word in words if word != ""]
+
+ if len(words) == 1:
+ words = words[0].split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[1].strip()
+ if "[" in name:
+ name = name.split("[")[0]
+ py_type = self.typedefs.get(words[0].strip(), "dict")
+ new_line = f" \"{name}\": \"{py_type}\",\n"
+ self.f_struct.write(new_line)
+
+ def process_typedef_md(self, line: str) -> None:
+ """处理类型定义"""
+ words = line.split(" ")[-1].split("\t")
+ words = [word for word in words if word != ""]
+
+ name = words[-1]
+ py_type = self.typedefs[words[0]]
+ new_line = f"{name} = \"{py_type}\"\n"
+
+ self.f_typedef.write(new_line)
+ self.typedefs[name] = py_type
+
+ if py_type == "dict":
+ short2full = f"{name} = {words[-2]}\n"
+ self.f_struct.write(short2full)
+
+ def process_typedef_td(self, line: str) -> None:
+ """处理类型定义"""
+ words = line.split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[-1]
+ py_type = self.typedefs.get(words[1], "dict")
+ new_line = f"{name} = \"{py_type}\"\n"
+
+ self.f_typedef.write(new_line)
+ self.typedefs[name] = py_type
+
+ if py_type == "dict":
+ short2full = f"{name} = {words[-2]}\n"
+ self.f_struct.write(short2full)
+
+ def process_const(self, line: str) -> None:
+ sectors = line.split("=")
+ value = sectors[1].replace("\'", "\"").strip()
+
+ words = sectors[0].split(" ")
+ words = [word for word in words if word != ""]
+
+ name = words[-1].strip()
+
+ new_line = f"{name} = {value}\n"
+ self.f_define.write(new_line)
+
+
+if __name__ == "__main__":
+ md_generator = DataTypeGenerator("../include/tap/TapQuoteAPIDataType.h", "tap", "md")
+ md_generator.run()
+
+ td_generator = DataTypeGenerator("../include/tap/iTapTradeAPIDataType.h", "tap", "td")
+ td_generator.run()
diff --git a/vnpy/api/tap/generator/tap_md_commen_constant.py b/vnpy/api/tap/generator/tap_md_commen_constant.py
new file mode 100644
index 0000000000..7fa721c3de
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_commen_constant.py
@@ -0,0 +1,30 @@
+APIYNFLAG_YES = "Y"
+APIYNFLAG_NO = "N"
+APILOGLEVEL_NONE = "N"
+APILOGLEVEL_ERROR = "E"
+APILOGLEVEL_WARNING = "W"
+APILOGLEVEL_DEBUG = "D"
+TAPI_COMMODITY_TYPE_NONE = "N"
+TAPI_COMMODITY_TYPE_SPOT = "P"
+TAPI_COMMODITY_TYPE_FUTURES = "F"
+TAPI_COMMODITY_TYPE_OPTION = "O"
+TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S"
+TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M"
+TAPI_COMMODITY_TYPE_BUL = "U"
+TAPI_COMMODITY_TYPE_BER = "E"
+TAPI_COMMODITY_TYPE_STD = "D"
+TAPI_COMMODITY_TYPE_STG = "G"
+TAPI_COMMODITY_TYPE_PRT = "R"
+TAPI_COMMODITY_TYPE_BLT = "L"
+TAPI_COMMODITY_TYPE_BRT = "Q"
+TAPI_COMMODITY_TYPE_DIRECTFOREX = "X"
+TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I"
+TAPI_COMMODITY_TYPE_CROSSFOREX = "C"
+TAPI_COMMODITY_TYPE_INDEX = "Z"
+TAPI_COMMODITY_TYPE_STOCK = "T"
+TAPI_COMMODITY_TYPE_SPOT_TRADINGDEFER = "Y"
+TAPI_COMMODITY_TYPE_FUTURE_LOCK = "J"
+TAPI_COMMODITY_TYPE_EFP = "A"
+TAPI_CALLPUT_FLAG_CALL = "C"
+TAPI_CALLPUT_FLAG_PUT = "P"
+TAPI_CALLPUT_FLAG_NONE = "N"
diff --git a/vnpy/api/tap/generator/tap_md_commen_struct.py b/vnpy/api/tap/generator/tap_md_commen_struct.py
new file mode 100644
index 0000000000..acee45ec74
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_commen_struct.py
@@ -0,0 +1,30 @@
+TapAPIApplicationInfo = {
+ "AuthCode": "string",
+ "KeyOperationLogPath": "string",
+}
+
+TapAPICommodity = {
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+}
+
+TapAPIContract = {
+ "Commodity": "dict",
+ "ContractNo1": "string",
+ "StrikePrice1": "string",
+ "CallOrPutFlag1": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+}
+
+TapAPIExchangeInfo = {
+ "ExchangeNo": "string",
+ "ExchangeName": "string",
+}
+
+TapAPIChangePasswordReq = {
+ "OldPassword": "string",
+ "NewPassword": "string",
+}
diff --git a/vnpy/api/tap/generator/tap_md_commen_typedef.py b/vnpy/api/tap/generator/tap_md_commen_typedef.py
new file mode 100644
index 0000000000..c0d22d36d4
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_commen_typedef.py
@@ -0,0 +1,30 @@
+TAPIINT32 = "int"
+TAPIUINT32 = "unsigned int"
+TAPIINT64 = "long long"
+TAPIUINT64 = "unsigned long long"
+TAPIUINT16 = "unsigned short"
+TAPIUINT8 = "unsigned char"
+TAPIREAL64 = "double"
+TAPIYNFLAG = "char"
+TAPILOGLEVEL = "char"
+TAPICommodityType = "char"
+TAPICallOrPutFlagType = "char"
+TAPIMACTYPE = "string"
+TAPISecondSerialIDType = "string"
+TAPIClientIDType = "string"
+TAPISTR_10 = "string"
+TAPISTR_20 = "string"
+TAPISTR_30 = "string"
+TAPISTR_40 = "string"
+TAPISTR_50 = "string"
+TAPISTR_70 = "string"
+TAPISTR_100 = "string"
+TAPISTR_300 = "string"
+TAPISTR_500 = "string"
+TAPISTR_2000 = "string"
+TAPIAUTHCODE = "string"
+TAPICHAR = "char"
+TAPIDTSTAMP = "string"
+TAPIDATETIME = "string"
+TAPIDATE = "string"
+TAPITIME = "string"
diff --git a/vnpy/api/tap/generator/tap_md_data_struct.py b/vnpy/api/tap/generator/tap_md_data_struct.py
new file mode 100644
index 0000000000..49a9b426b4
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_data_struct.py
@@ -0,0 +1,99 @@
+TapAPIQuoteLoginAuth = {
+ "UserNo": "string",
+ "ISModifyPassword": "char",
+ "Password": "string",
+ "NewPassword": "string",
+ "QuoteTempPassword": "string",
+ "ISDDA": "char",
+ "DDASerialNo": "string",
+}
+
+TapAPIQuotLoginRspInfo = {
+ "UserNo": "string",
+ "UserType": "int",
+ "UserName": "string",
+ "QuoteTempPassword": "string",
+ "ReservedInfo": "string",
+ "LastLoginIP": "string",
+ "LastLoginProt": "unsigned int",
+ "LastLoginTime": "string",
+ "LastLogoutTime": "string",
+ "TradeDate": "string",
+ "LastSettleTime": "string",
+ "StartTime": "string",
+ "InitTime": "string",
+}
+
+TapAPIQuoteCommodityInfo = {
+ "Commodity": "dict",
+ "CommodityName": "string",
+ "CommodityEngName": "string",
+ "ContractSize": "double",
+ "CommodityTickSize": "double",
+ "CommodityDenominator": "int",
+ "CmbDirect": "char",
+ "CommodityContractLen": "int",
+ "IsDST": "char",
+ "RelateCommodity1": "dict",
+ "RelateCommodity2": "dict",
+}
+
+TapAPIQuoteContractInfo = {
+ "Contract": "dict",
+ "ContractType": "char",
+ "QuoteUnderlyingContract": "string",
+ "ContractName": "string",
+ "ContractExpDate": "string",
+ "LastTradeDate": "string",
+ "FirstNoticeDate": "string",
+}
+
+TapAPIQuoteWhole = {
+ "Contract": "dict",
+ "CurrencyNo": "string",
+ "TradingState": "char",
+ "DateTimeStamp": "string",
+ "QPreClosingPrice": "double",
+ "QPreSettlePrice": "double",
+ "QPrePositionQty": "unsigned long long",
+ "QOpeningPrice": "double",
+ "QLastPrice": "double",
+ "QHighPrice": "double",
+ "QLowPrice": "double",
+ "QHisHighPrice": "double",
+ "QHisLowPrice": "double",
+ "QLimitUpPrice": "double",
+ "QLimitDownPrice": "double",
+ "QTotalQty": "unsigned long long",
+ "QTotalTurnover": "double",
+ "QPositionQty": "unsigned long long",
+ "QAveragePrice": "double",
+ "QClosingPrice": "double",
+ "QSettlePrice": "double",
+ "QLastQty": "unsigned long long",
+ "QBidPrice": "double",
+ "QBidQty": "unsigned long long",
+ "QAskPrice": "double",
+ "QAskQty": "unsigned long long",
+ "QImpliedBidPrice": "double",
+ "QImpliedBidQty": "unsigned long long",
+ "QImpliedAskPrice": "double",
+ "QImpliedAskQty": "unsigned long long",
+ "QPreDelta": "double",
+ "QCurrDelta": "double",
+ "QInsideQty": "unsigned long long",
+ "QOutsideQty": "unsigned long long",
+ "QTurnoverRate": "double",
+ "Q5DAvgQty": "unsigned long long",
+ "QPERatio": "double",
+ "QTotalValue": "double",
+ "QNegotiableValue": "double",
+ "QPositionTrend": "long long",
+ "QChangeSpeed": "double",
+ "QChangeRate": "double",
+ "QChangeValue": "double",
+ "QSwing": "double",
+ "QTotalBidQty": "unsigned long long",
+ "QTotalAskQty": "unsigned long long",
+ "UnderlyContract": "dict",
+}
diff --git a/vnpy/api/tap/generator/tap_md_data_typedef.py b/vnpy/api/tap/generator/tap_md_data_typedef.py
new file mode 100644
index 0000000000..a0a84fe900
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_data_typedef.py
@@ -0,0 +1,3 @@
+TAPIQPRICE = "double"
+TAPIQVOLUME = "unsigned long long"
+TAPIQDIFF = "long long"
diff --git a/vnpy/api/tap/generator/tap_md_error_constant.py b/vnpy/api/tap/generator/tap_md_error_constant.py
new file mode 100644
index 0000000000..351140a914
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_error_constant.py
@@ -0,0 +1,160 @@
+TAPIERROR_SUCCEED = 0
+TAPIERROR_ConnectFail = -1
+TAPIERROR_LinkAuthFail = -2
+TAPIERROR_HostUnavailable = -3
+TAPIERROR_SendDataError = -4
+TAPIERROR_TestIDError = -5
+TAPIERROR_NotReadyTestNetwork = -6
+TAPIERROR_CurTestNotOver = -7
+TAPIERROR_NOFrontAvailable = -8
+TAPIERROR_DataPathAvaiable = -9
+TAPIERROR_RepeatLogin = -10
+TAPIERROR_InnerError = -11
+TAPIERROR_LastReqNotFinish = -12
+TAPIERROR_InputValueError = -13
+TAPIERROR_AuthCode_Invalid = -14
+TAPIERROR_AuthCode_Expired = -15
+TAPIERROR_AuthCode_TypeNotMatch = -16
+TAPIERROR_API_NotReady = -17
+TAPIERROR_UDP_LISTEN_FAILED = -18
+TAPIERROR_UDP_LISTENING = -19
+TAPIERROR_NotImplemented = -20
+TAPIERROR_CallOneTimeOnly = -21
+TAPIERROR_Frequently = -22
+TAPIERROR_INPUTERROR_NULL = -10000
+TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001
+TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002
+TAPIERROR_INPUTERROR_TAPICommodityType = -10003
+TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004
+TAPIERROR_INPUTERROR_TAPIAccountType = -12001
+TAPIERROR_INPUTERROR_TAPIAccountState = -12003
+TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004
+TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005
+TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006
+TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007
+TAPIERROR_INPUTERROR_TAPISideType = -12008
+TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009
+TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010
+TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011
+TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012
+TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013
+TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014
+TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015
+TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016
+TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017
+TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021
+TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022
+TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023
+TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024
+TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025
+TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035
+TAPIERROR_INPUTERROR_TAPIORDERACT = -12036
+TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041
+TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042
+TAPIERROR_INPUTERROR_TAPITradingStateType = -12043
+TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044
+TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045
+TAPIERROR_DISCONNECT_CLOSE_INIT = 1
+TAPIERROR_DISCONNECT_CLOSE_PASS = 2
+TAPIERROR_DISCONNECT_READ_ERROR = 3
+TAPIERROR_DISCONNECT_WRITE_ERROR = 4
+TAPIERROR_DISCONNECT_BUF_FULL = 5
+TAPIERROR_DISCONNECT_IOCP_ERROR = 6
+TAPIERROR_DISCONNECT_PARSE_ERROR = 7
+TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8
+TAPIERROR_DISCONNECT_INIT_ERROR = 9
+TAPIERROR_DISCONNECT_HAS_CONNECTED = 10
+TAPIERROR_DISCONNECT_HAS_EXIT = 11
+TAPIERROR_DISCONNECT_TRY_LATER = 12
+TAPIERROR_DISCONNECT_HEARTBEAT_FAILED = 13
+TAPIERROR_LOGIN = 10001
+TAPIERROR_LOGIN_USER = 10002
+TAPIERROR_LOGIN_DDA = 10003
+TAPIERROR_LOGIN_LICENSE = 10004
+TAPIERROR_LOGIN_MODULE = 10005
+TAPIERROR_LOGIN_FORCE = 10006
+TAPIERROR_LOGIN_STATE = 10007
+TAPIERROR_LOGIN_PASS = 10008
+TAPIERROR_LOGIN_RIGHT = 10009
+TAPIERROR_LOGIN_COUNT = 10010
+TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011
+TAPIERROR_LOGIN_USER_EXPIRED = 10012
+TAPIERROR_LOGIN_NO_ACCOUNT = 10013
+TAPIERROR_LOGIN_NO_JGT = 10014
+TAPIERROR_LOGIN_ERROR_TIMES = 10015
+TAPIERROR_LOGIN_ERROR_AUTHTYPE = 10016
+TAPIERROR_LOGIN_ERROR_AUTHEXPIRED = 10017
+TAPIERROR_LOGIN_ERROR_PASSWDEXPIRED = 10018
+TAPIERROR_USERINFO_QRY = 10101
+TAPIERROR_USERALLRIGHT_QRY = 11001
+TAPIERROR_USERALLACCOUNT_QRY = 11501
+TAPIERROR_USERPASSWORD_MOD = 11701
+TAPIERROR_USERPASSWORD_MOD_SOURCE = 11702
+TAPIERROR_USERPASSWORD_MOD_SAME = 11703
+TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 11704
+TAPIERROR_ACCOUNTINFO_QRY = 20201
+TAPIERROR_TRADENO_QRY = 20701
+TAPIERROR_CONTRACTINFO_QRY = 22801
+TAPIERROR_SPECIALOPTIONFUTURE_QRY = 22901
+TAPIERROR_COMMODITYORDERTYPE_QRY = 25501
+TAPIERROR_ORDERTIMEINFORCE_QRY = 25601
+TAPIERROR_USER_ORDER_FREQUENCE_QRY = 28901
+TAPIERROR_ORDERINSERT_ACCOUNT = 60001
+TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002
+TAPIERROR_ORDERINSERT_SIDE_TRADE = 60003
+TAPIERROR_ORDERINSERT_OPTIONS_TRADE = 60004
+TAPIERROR_ORDERINSERT_COMMODITY_TRADE = 60005
+TAPIERROR_ORDERINSERT_OPEN_RIGHT = 60006
+TAPIERROR_ORDERINSERT_RISK_CHECK = 60007
+TAPIERROR_ORDERINSERT_CONTRACT = 60011
+TAPIERROR_ORDERINSERT_TRADEROUTE = 60021
+TAPIERROR_ORDERINSERT_POSITIONMAX = 60022
+TAPIERROR_ORDER_NOTRADE = 60023
+TAPIERROR_ORDER_CLOSE = 60024
+TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60031
+TAPIERROR_ORDERINSERT_ORDERTYPE = 60032
+TAPIERROR_ORDERINSERT_TIMEINFORCE = 60033
+TAPIERROR_ORDERINSERT_NO_TACTICS = 60034
+TAPIERROR_ORDERINSERT_POSITION_CANNOT_CLOSE = 60035
+TAPIERROR_ORDERINSERT_AUTOCHECK_FAIL = 60036
+TAPIERROR_ORDERINSERT_LME_NOTREADY = 60037
+TAPIERROR_ORDERINSERT_CLOSEMODE = 60038
+TAPIERROR_ORDERINSERT_PARENTNOTENOUGHFUND = 60039
+TAPIERROR_SWAP_CONTRACT = 60040
+TAPIERROR_USERNO_NOTHAS_ACCOUNT = 60051
+TAPIERROR_UPPERCHANNEL_BROKEN = 60052
+TAPIERROR_UPPERCHANNEL_NOT_EXIST = 60053
+TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061
+TAPIERROR_ORDERDELETE_NOT_STATE = 60062
+TAPIERROR_ORDERACTIVE_NOT_STATE = 60063
+TAPIERROR_ORDERCHECK_NOT_STATE = 60071
+TAPIERROR_ORDERCHECK_FAIL = 60072
+TAPIERROR_ORDERMODIFY_NOT_STATE = 60081
+TAPIERROR_ORDERMODIFY_BACK_INPUT = 60082
+TAPIERROR_ORDERINSERT_FEE = 60091
+TAPIERROR_ORDERINSERT_MARGIN = 60092
+TAPIERROR_ORDER_NO_PERMIT = 60100
+TAPIERROR_RSPQUOTE_NO_PERMIT = 60101
+TAPIERROR_RSPQUOTE_CHILD_NO_PERMIT = 60102
+TAPIERROR_TRADENO_NOT_FIND = 60103
+TAPIERROR_ORDER_NO_CLOSE = 60104
+TAPIERROR_QRY_QUOTE_NO_PERMIT = 60105
+TAPIERROR_EXPIREDATE_NO_PERMIT = 60106
+TAPIERROR_CMB_NO_PERMIT = 60107
+TAPIERROR_ORDERSERVER_NO_PERMIT = 60108
+TAPIERROR_POSITION_CANNOT_EXEC_OR_ABANDON = 60109
+TAPIERROR_ORDERCHECK_NO_PERMIT = 60110
+TAPIERROR_ORDERMAXOPENVOL_NO_PERMIT = 60111
+TAPIERROR_ORDER_QTY_NO_PERMIT = 60115
+TAPIERROR_ORDER_APPLY_NO_PERMIT = 60117
+TAPIERROR_ORDER_FREQ_OVERRUN = 60118
+TAPIERROR_COMB_NO_SIDEORHEDGE = 60119
+TAPIERROR_ORDER_FREQUENCY = 61001
+TAPIERROR_ORDER_QUERYING = 61002
+TAPIERROR_SUBSCRIBEQUOTE_MAX = 72001
+TAPIERROR_SUBSCRIBEQUOTE_EXCHANGE_MAX = 72002
+TAPIERROR_SUBSCRIBEQUOTE_NO_RIGHT = 72101
+TAPIERROR_SUBSCRIBEQUOTE_NO_EXCHANGE_RIGHT = 72102
+TAPIERROR_SUBSCRIBEQUOTE_COMMODITY_NOT_EXIST = 72103
+TAPIERROR_SUBSCRIBEQUOTE_CONTRACT_MAY_NOT_EXIST = 72104
+TAPIERROR_QUOTEFRONT_UNKNOWN_PROTOCOL = 83001
diff --git a/vnpy/api/tap/generator/tap_md_header_define.h b/vnpy/api/tap/generator/tap_md_header_define.h
new file mode 100644
index 0000000000..9ee4138fbe
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_header_define.h
@@ -0,0 +1,8 @@
+#define ONRSPLOGIN 0
+#define ONAPIREADY 1
+#define ONDISCONNECT 2
+#define ONRSPQRYCOMMODITY 3
+#define ONRSPQRYCONTRACT 4
+#define ONRSPSUBSCRIBEQUOTE 5
+#define ONRSPUNSUBSCRIBEQUOTE 6
+#define ONRTNQUOTE 7
diff --git a/vnpy/api/tap/generator/tap_md_header_function.h b/vnpy/api/tap/generator/tap_md_header_function.h
new file mode 100644
index 0000000000..6b73c4d9c4
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_header_function.h
@@ -0,0 +1,4 @@
+int qryCommodity(unsigned int session);
+
+int qryContract(unsigned int session, const dict &data);
+
diff --git a/vnpy/api/tap/generator/tap_md_header_on.h b/vnpy/api/tap/generator/tap_md_header_on.h
new file mode 100644
index 0000000000..78f3f64886
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_header_on.h
@@ -0,0 +1,16 @@
+virtual void onRspLogin(int error, const dict &data) {};
+
+virtual void onAPIReady() {};
+
+virtual void onDisconnect(int reason) {};
+
+virtual void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryContract(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspSubscribeQuote(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspUnSubscribeQuote(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnQuote(const dict &data) {};
+
diff --git a/vnpy/api/tap/generator/tap_md_header_process.h b/vnpy/api/tap/generator/tap_md_header_process.h
new file mode 100644
index 0000000000..36517cbe50
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_header_process.h
@@ -0,0 +1,16 @@
+void processRspLogin(Task *task);
+
+void processAPIReady(Task *task);
+
+void processDisconnect(Task *task);
+
+void processRspQryCommodity(Task *task);
+
+void processRspQryContract(Task *task);
+
+void processRspSubscribeQuote(Task *task);
+
+void processRspUnSubscribeQuote(Task *task);
+
+void processRtnQuote(Task *task);
+
diff --git a/vnpy/api/tap/generator/tap_md_source_function.cpp b/vnpy/api/tap/generator/tap_md_source_function.cpp
new file mode 100644
index 0000000000..81b19663cc
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_function.cpp
@@ -0,0 +1,17 @@
+int MdApi::qryCommodity(unsigned int session)
+{
+ int i = this->api->QryCommodity(session);
+ return i;
+};
+
+int MdApi::qryContract(unsigned int session, const dict &req)
+{
+ TapAPICommodity myreq = TapAPICommodity();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "ExchangeNo", myreq.ExchangeNo);
+ getChar(req, "CommodityType", &myreq.CommodityType);
+ getString(req, "CommodityNo", myreq.CommodityNo);
+ int i = this->api->QryContract(session, &myreq);
+ return i;
+};
+
diff --git a/vnpy/api/tap/generator/tap_md_source_module.cpp b/vnpy/api/tap/generator/tap_md_source_module.cpp
new file mode 100644
index 0000000000..050b32742d
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_module.cpp
@@ -0,0 +1,12 @@
+.def("qryCommodity", &MdApi::qryCommodity)
+.def("qryContract", &MdApi::qryContract)
+
+.def("onRspLogin", &MdApi::onRspLogin)
+.def("onAPIReady", &MdApi::onAPIReady)
+.def("onDisconnect", &MdApi::onDisconnect)
+.def("onRspQryCommodity", &MdApi::onRspQryCommodity)
+.def("onRspQryContract", &MdApi::onRspQryContract)
+.def("onRspSubscribeQuote", &MdApi::onRspSubscribeQuote)
+.def("onRspUnSubscribeQuote", &MdApi::onRspUnSubscribeQuote)
+.def("onRtnQuote", &MdApi::onRtnQuote)
+;
diff --git a/vnpy/api/tap/generator/tap_md_source_on.cpp b/vnpy/api/tap/generator/tap_md_source_on.cpp
new file mode 100644
index 0000000000..fd5691aa56
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_on.cpp
@@ -0,0 +1,96 @@
+void onRspLogin(int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRspLogin, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onAPIReady() override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onAPIReady);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onDisconnect(int reasonCode) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onDisconnect, reasonCode);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRspQryCommodity, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryContract(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRspQryContract, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspSubscribeQuote(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRspSubscribeQuote, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspUnSubscribeQuote(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRspUnSubscribeQuote, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnQuote(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, MdApi, onRtnQuote, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
diff --git a/vnpy/api/tap/generator/tap_md_source_process.cpp b/vnpy/api/tap/generator/tap_md_source_process.cpp
new file mode 100644
index 0000000000..5d9f32358c
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_process.cpp
@@ -0,0 +1,215 @@
+void MdApi::processRspLogin(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIQuotLoginRspInfo *task_data = (TapAPIQuotLoginRspInfo*)task->task_data;
+ data["UserNo"] = toUtf(task_data->UserNo);
+ data["UserType"] = task_data->UserType;
+ data["UserName"] = toUtf(task_data->UserName);
+ data["QuoteTempPassword"] = toUtf(task_data->QuoteTempPassword);
+ data["ReservedInfo"] = toUtf(task_data->ReservedInfo);
+ data["LastLoginIP"] = toUtf(task_data->LastLoginIP);
+ data["LastLoginProt"] = task_data->LastLoginProt;
+ data["LastLoginTime"] = toUtf(task_data->LastLoginTime);
+ data["LastLogoutTime"] = toUtf(task_data->LastLogoutTime);
+ data["TradeDate"] = toUtf(task_data->TradeDate);
+ data["LastSettleTime"] = toUtf(task_data->LastSettleTime);
+ data["StartTime"] = toUtf(task_data->StartTime);
+ data["InitTime"] = toUtf(task_data->InitTime);
+ delete task_data;
+ }
+ this->onRspLogin(task->task_int, data);
+};
+
+void MdApi::processAPIReady(Task *task)
+{
+ this->onAPIReady();
+};
+
+void MdApi::processDisconnect(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onDisconnect(task->task_int);
+};
+
+void MdApi::processRspQryCommodity(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIQuoteCommodityInfo *task_data = (TapAPIQuoteCommodityInfo*)task->task_data;
+ data["Commodity"] = task_data->Commodity;
+ data["CommodityName"] = toUtf(task_data->CommodityName);
+ data["CommodityEngName"] = toUtf(task_data->CommodityEngName);
+ data["ContractSize"] = task_data->ContractSize;
+ data["CommodityTickSize"] = task_data->CommodityTickSize;
+ data["CommodityDenominator"] = task_data->CommodityDenominator;
+ data["CmbDirect"] = task_data->CmbDirect;
+ data["CommodityContractLen"] = task_data->CommodityContractLen;
+ data["IsDST"] = task_data->IsDST;
+ data["RelateCommodity1"] = task_data->RelateCommodity1;
+ data["RelateCommodity2"] = task_data->RelateCommodity2;
+ delete task_data;
+ }
+ this->onRspQryCommodity(task->task_id, task->task_int, task->task_last, data);
+};
+
+void MdApi::processRspQryContract(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIQuoteContractInfo *task_data = (TapAPIQuoteContractInfo*)task->task_data;
+ data["Contract"] = task_data->Contract;
+ data["ContractType"] = task_data->ContractType;
+ data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract);
+ data["ContractName"] = toUtf(task_data->ContractName);
+ data["ContractExpDate"] = toUtf(task_data->ContractExpDate);
+ data["LastTradeDate"] = toUtf(task_data->LastTradeDate);
+ data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate);
+ delete task_data;
+ }
+ this->onRspQryContract(task->task_id, task->task_int, task->task_last, data);
+};
+
+void MdApi::processRspSubscribeQuote(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIQuoteWhole *task_data = (TapAPIQuoteWhole*)task->task_data;
+ data["Contract"] = task_data->Contract;
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["TradingState"] = task_data->TradingState;
+ data["DateTimeStamp"] = toUtf(task_data->DateTimeStamp);
+ data["QPreClosingPrice"] = task_data->QPreClosingPrice;
+ data["QPreSettlePrice"] = task_data->QPreSettlePrice;
+ data["QPrePositionQty"] = task_data->QPrePositionQty;
+ data["QOpeningPrice"] = task_data->QOpeningPrice;
+ data["QLastPrice"] = task_data->QLastPrice;
+ data["QHighPrice"] = task_data->QHighPrice;
+ data["QLowPrice"] = task_data->QLowPrice;
+ data["QHisHighPrice"] = task_data->QHisHighPrice;
+ data["QHisLowPrice"] = task_data->QHisLowPrice;
+ data["QLimitUpPrice"] = task_data->QLimitUpPrice;
+ data["QLimitDownPrice"] = task_data->QLimitDownPrice;
+ data["QTotalQty"] = task_data->QTotalQty;
+ data["QTotalTurnover"] = task_data->QTotalTurnover;
+ data["QPositionQty"] = task_data->QPositionQty;
+ data["QAveragePrice"] = task_data->QAveragePrice;
+ data["QClosingPrice"] = task_data->QClosingPrice;
+ data["QSettlePrice"] = task_data->QSettlePrice;
+ data["QLastQty"] = task_data->QLastQty;
+ data["QBidPrice"] = task_data->QBidPrice;
+ data["QBidQty"] = task_data->QBidQty;
+ data["QAskPrice"] = task_data->QAskPrice;
+ data["QAskQty"] = task_data->QAskQty;
+ data["QImpliedBidPrice"] = task_data->QImpliedBidPrice;
+ data["QImpliedBidQty"] = task_data->QImpliedBidQty;
+ data["QImpliedAskPrice"] = task_data->QImpliedAskPrice;
+ data["QImpliedAskQty"] = task_data->QImpliedAskQty;
+ data["QPreDelta"] = task_data->QPreDelta;
+ data["QCurrDelta"] = task_data->QCurrDelta;
+ data["QInsideQty"] = task_data->QInsideQty;
+ data["QOutsideQty"] = task_data->QOutsideQty;
+ data["QTurnoverRate"] = task_data->QTurnoverRate;
+ data["Q5DAvgQty"] = task_data->Q5DAvgQty;
+ data["QPERatio"] = task_data->QPERatio;
+ data["QTotalValue"] = task_data->QTotalValue;
+ data["QNegotiableValue"] = task_data->QNegotiableValue;
+ data["QPositionTrend"] = task_data->QPositionTrend;
+ data["QChangeSpeed"] = task_data->QChangeSpeed;
+ data["QChangeRate"] = task_data->QChangeRate;
+ data["QChangeValue"] = task_data->QChangeValue;
+ data["QSwing"] = task_data->QSwing;
+ data["QTotalBidQty"] = task_data->QTotalBidQty;
+ data["QTotalAskQty"] = task_data->QTotalAskQty;
+ data["UnderlyContract"] = task_data->UnderlyContract;
+ delete task_data;
+ }
+ this->onRspSubscribeQuote(task->task_id, task->task_int, task->task_last, data);
+};
+
+void MdApi::processRspUnSubscribeQuote(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIContract *task_data = (TapAPIContract*)task->task_data;
+ data["Commodity"] = task_data->Commodity;
+ data["ContractNo1"] = toUtf(task_data->ContractNo1);
+ data["StrikePrice1"] = toUtf(task_data->StrikePrice1);
+ data["CallOrPutFlag1"] = task_data->CallOrPutFlag1;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ delete task_data;
+ }
+ this->onRspUnSubscribeQuote(task->task_id, task->task_int, task->task_last, data);
+};
+
+void MdApi::processRtnQuote(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIQuoteWhole *task_data = (TapAPIQuoteWhole*)task->task_data;
+ data["Contract"] = task_data->Contract;
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["TradingState"] = task_data->TradingState;
+ data["DateTimeStamp"] = toUtf(task_data->DateTimeStamp);
+ data["QPreClosingPrice"] = task_data->QPreClosingPrice;
+ data["QPreSettlePrice"] = task_data->QPreSettlePrice;
+ data["QPrePositionQty"] = task_data->QPrePositionQty;
+ data["QOpeningPrice"] = task_data->QOpeningPrice;
+ data["QLastPrice"] = task_data->QLastPrice;
+ data["QHighPrice"] = task_data->QHighPrice;
+ data["QLowPrice"] = task_data->QLowPrice;
+ data["QHisHighPrice"] = task_data->QHisHighPrice;
+ data["QHisLowPrice"] = task_data->QHisLowPrice;
+ data["QLimitUpPrice"] = task_data->QLimitUpPrice;
+ data["QLimitDownPrice"] = task_data->QLimitDownPrice;
+ data["QTotalQty"] = task_data->QTotalQty;
+ data["QTotalTurnover"] = task_data->QTotalTurnover;
+ data["QPositionQty"] = task_data->QPositionQty;
+ data["QAveragePrice"] = task_data->QAveragePrice;
+ data["QClosingPrice"] = task_data->QClosingPrice;
+ data["QSettlePrice"] = task_data->QSettlePrice;
+ data["QLastQty"] = task_data->QLastQty;
+ data["QBidPrice"] = task_data->QBidPrice;
+ data["QBidQty"] = task_data->QBidQty;
+ data["QAskPrice"] = task_data->QAskPrice;
+ data["QAskQty"] = task_data->QAskQty;
+ data["QImpliedBidPrice"] = task_data->QImpliedBidPrice;
+ data["QImpliedBidQty"] = task_data->QImpliedBidQty;
+ data["QImpliedAskPrice"] = task_data->QImpliedAskPrice;
+ data["QImpliedAskQty"] = task_data->QImpliedAskQty;
+ data["QPreDelta"] = task_data->QPreDelta;
+ data["QCurrDelta"] = task_data->QCurrDelta;
+ data["QInsideQty"] = task_data->QInsideQty;
+ data["QOutsideQty"] = task_data->QOutsideQty;
+ data["QTurnoverRate"] = task_data->QTurnoverRate;
+ data["Q5DAvgQty"] = task_data->Q5DAvgQty;
+ data["QPERatio"] = task_data->QPERatio;
+ data["QTotalValue"] = task_data->QTotalValue;
+ data["QNegotiableValue"] = task_data->QNegotiableValue;
+ data["QPositionTrend"] = task_data->QPositionTrend;
+ data["QChangeSpeed"] = task_data->QChangeSpeed;
+ data["QChangeRate"] = task_data->QChangeRate;
+ data["QChangeValue"] = task_data->QChangeValue;
+ data["QSwing"] = task_data->QSwing;
+ data["QTotalBidQty"] = task_data->QTotalBidQty;
+ data["QTotalAskQty"] = task_data->QTotalAskQty;
+ data["UnderlyContract"] = task_data->UnderlyContract;
+ delete task_data;
+ }
+ this->onRtnQuote(data);
+};
+
diff --git a/vnpy/api/tap/generator/tap_md_source_switch.cpp b/vnpy/api/tap/generator/tap_md_source_switch.cpp
new file mode 100644
index 0000000000..fd5edaef51
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_switch.cpp
@@ -0,0 +1,48 @@
+case ONRSPLOGIN:
+{
+ this->processRspLogin(&task);
+ break;
+}
+
+case ONAPIREADY:
+{
+ this->processAPIReady(&task);
+ break;
+}
+
+case ONDISCONNECT:
+{
+ this->processDisconnect(&task);
+ break;
+}
+
+case ONRSPQRYCOMMODITY:
+{
+ this->processRspQryCommodity(&task);
+ break;
+}
+
+case ONRSPQRYCONTRACT:
+{
+ this->processRspQryContract(&task);
+ break;
+}
+
+case ONRSPSUBSCRIBEQUOTE:
+{
+ this->processRspSubscribeQuote(&task);
+ break;
+}
+
+case ONRSPUNSUBSCRIBEQUOTE:
+{
+ this->processRspUnSubscribeQuote(&task);
+ break;
+}
+
+case ONRTNQUOTE:
+{
+ this->processRtnQuote(&task);
+ break;
+}
+
diff --git a/vnpy/api/tap/generator/tap_md_source_task.cpp b/vnpy/api/tap/generator/tap_md_source_task.cpp
new file mode 100644
index 0000000000..09336fb1dc
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_md_source_task.cpp
@@ -0,0 +1,106 @@
+void MdApi::OnRspLogin(int errorCode, TapAPIQuotLoginRspInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPLOGIN;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIQuotLoginRspInfo *task_data = new TapAPIQuotLoginRspInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void MdApi::OnAPIReady()
+{
+ Task task = Task();
+ task.task_name = ONAPIREADY;
+ this->task_queue.push(task);
+};
+
+void MdApi::OnDisconnect(int reasonCode)
+{
+ Task task = Task();
+ task.task_name = ONDISCONNECT;
+ task.task_int = reasonCode;
+ this->task_queue.push(task);
+};
+
+void MdApi::OnRspQryCommodity(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteCommodityInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYCOMMODITY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIQuoteCommodityInfo *task_data = new TapAPIQuoteCommodityInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void MdApi::OnRspQryContract(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteContractInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYCONTRACT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIQuoteContractInfo *task_data = new TapAPIQuoteContractInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void MdApi::OnRspSubscribeQuote(unsigned int sessionID, int errorCode, char isLast, TapAPIQuoteWhole *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPSUBSCRIBEQUOTE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIQuoteWhole *task_data = new TapAPIQuoteWhole();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void MdApi::OnRspUnSubscribeQuote(unsigned int sessionID, int errorCode, char isLast, TapAPIContract *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPUNSUBSCRIBEQUOTE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIContract *task_data = new TapAPIContract();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void MdApi::OnRtnQuote(TapAPIQuoteWhole *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNQUOTE;
+ if (info)
+ {
+ TapAPIQuoteWhole *task_data = new TapAPIQuoteWhole();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
diff --git a/vnpy/api/tap/generator/tap_td_commen_constant.py b/vnpy/api/tap/generator/tap_td_commen_constant.py
new file mode 100644
index 0000000000..aa6dd53e18
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_commen_constant.py
@@ -0,0 +1,31 @@
+APIYNFLAG_YES = "Y"
+APIYNFLAG_NO = "N"
+APIPASSWORD_TRADE = "T"
+APIPASSWORD_PHONE = "P"
+APILOGLEVEL_NONE = "N"
+APILOGLEVEL_ERROR = "E"
+APILOGLEVEL_WARNING = "W"
+APILOGLEVEL_DEBUG = "D"
+TAPI_OPTION_TYPE_AMERICAN = "A"
+TAPI_OPTION_TYPE_AMERICAN2 = "B"
+TAPI_OPTION_TYPE_EUROPEAN = "E"
+TAPI_OPTION_TYPE_EUROPEAN2 = "F"
+TAPI_COMMODITY_TYPE_NONE = "N"
+TAPI_COMMODITY_TYPE_SPOT = "P"
+TAPI_COMMODITY_TYPE_FUTURES = "F"
+TAPI_COMMODITY_TYPE_OPTION = "O"
+TAPI_COMMODITY_TYPE_SPREAD_MONTH = "S"
+TAPI_COMMODITY_TYPE_SPREAD_COMMODITY = "M"
+TAPI_COMMODITY_TYPE_BUL = "U"
+TAPI_COMMODITY_TYPE_BER = "E"
+TAPI_COMMODITY_TYPE_STD = "D"
+TAPI_COMMODITY_TYPE_STG = "G"
+TAPI_COMMODITY_TYPE_PRT = "R"
+TAPI_COMMODITY_TYPE_DIRECTFOREX = "X"
+TAPI_COMMODITY_TYPE_INDIRECTFOREX = "I"
+TAPI_COMMODITY_TYPE_CROSSFOREX = "C"
+TAPI_COMMODITY_TYPE_INDEX = "Z"
+TAPI_COMMODITY_TYPE_STOCK = "T"
+TAPI_CALLPUT_FLAG_CALL = "C"
+TAPI_CALLPUT_FLAG_PUT = "P"
+TAPI_CALLPUT_FLAG_NONE = "N"
diff --git a/vnpy/api/tap/generator/tap_td_commen_struct.py b/vnpy/api/tap/generator/tap_td_commen_struct.py
new file mode 100644
index 0000000000..25511a8326
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_commen_struct.py
@@ -0,0 +1,37 @@
+TapAPIApplicationInfo = {
+ "AuthCode": "string",
+ "KeyOperationLogPath": "string",
+}
+
+TapAPICommodity = {
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+}
+
+TapAPIContract = {
+ "Commodity": "dict",
+ "ContractNo1": "string",
+ "StrikePrice1": "string",
+ "CallOrPutFlag1": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+}
+
+TapAPIExchangeInfo = {
+ "ExchangeNo": "string",
+ "ExchangeName": "string",
+}
+
+TapAPIChangePasswordReq = {
+ "PasswordType": "char",
+ "OldPassword": "string",
+ "NewPassword": "string",
+}
+
+TapAPIAuthPasswordReq = {
+ "AccountNo": "string",
+ "PasswordType": "char",
+ "Password": "string",
+}
diff --git a/vnpy/api/tap/generator/tap_td_commen_typedef.py b/vnpy/api/tap/generator/tap_td_commen_typedef.py
new file mode 100644
index 0000000000..68a098d13a
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_commen_typedef.py
@@ -0,0 +1,32 @@
+TAPIINT32 = "int"
+TAPIUINT32 = "unsigned int"
+TAPIINT64 = "long long"
+TAPIUINT64 = "unsigned long long"
+TAPIUINT16 = "unsigned short"
+TAPIUINT8 = "unsigned char"
+TAPIREAL64 = "double"
+TAPIYNFLAG = "char"
+TAPIPasswordType = "char"
+TAPILOGLEVEL = "char"
+TAPIOptionType = "char"
+TAPICommodityType = "char"
+TAPICallOrPutFlagType = "char"
+TAPISTR_10 = "string"
+TAPISTR_20 = "string"
+TAPISTR_30 = "string"
+TAPISTR_40 = "string"
+TAPISTR_50 = "string"
+TAPISTR_70 = "string"
+TAPISTR_100 = "string"
+TAPISTR_300 = "string"
+TAPISTR_500 = "string"
+TAPISTR_2000 = "string"
+TAPIAUTHCODE = "string"
+TAPIMACTYPE = "string"
+TAPISecondSerialIDType = "string"
+TAPICHAR = "char"
+TAPIClientIDType = "string"
+TAPIDTSTAMP = "string"
+TAPIDATETIME = "string"
+TAPIDATE = "string"
+TAPITIME = "string"
diff --git a/vnpy/api/tap/generator/tap_td_data_constant.py b/vnpy/api/tap/generator/tap_td_data_constant.py
new file mode 100644
index 0000000000..f2e5129fc6
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_data_constant.py
@@ -0,0 +1,175 @@
+TAPI_ACCOUNT_TYPE_PERSON = "P"
+TAPI_ACCOUNT_TYPE_ORGANIZATION = "O"
+TAPI_ACCOUNT_TYPE_AGENT = "A"
+TAPI_ACCOUNT_TYPE_MARGIN = "M"
+TAPI_ACCOUNT_TYPE_HOUSE = "H"
+TAPI_ACCOUNT_TYPE_STOCK = "S"
+TAPI_RIGHT_ORDER_DEL = 30001
+TAPI_RIGHT_ORDER_CHECK = 30002
+TAPI_RIGHT_ONLY_QRY = 31000
+TAPI_RIGHT_ONLY_OPEN = 31001
+TAPI_USERTYPE_CLIENT = 10000
+TAPI_USERTYPE_BROKER = 20000
+TAPI_USERTYPE_TRADER = 30000
+TAPI_USERTYPE_RISK = 40000
+TAPI_USERTYPE_MANAGER = 50000
+TAPI_USERTYPE_QUOTE = 60000
+TAPI_ACCOUNT_STATE_NORMAL = "N"
+TAPI_ACCOUNT_STATE_CANCEL = "C"
+TAPI_ACCOUNT_STATE_SLEEP = "S"
+TAPI_ACCOUNT_TRADING_RIGHT_NORMAL = "0"
+TAPI_ACCOUNT_TRADING_RIGHT_NOTRADE = "1"
+TAPI_ACCOUNT_TRADING_RIGHT_CLOSE = "2"
+TAPI_ORDER_TYPE_MARKET = "1"
+TAPI_ORDER_TYPE_LIMIT = "2"
+TAPI_ORDER_TYPE_STOP_MARKET = "3"
+TAPI_ORDER_TYPE_STOP_LIMIT = "4"
+TAPI_ORDER_TYPE_OPT_EXEC = "5"
+TAPI_ORDER_TYPE_OPT_ABANDON = "6"
+TAPI_ORDER_TYPE_REQQUOT = "7"
+TAPI_ORDER_TYPE_RSPQUOT = "8"
+TAPI_ORDER_TYPE_ICEBERG = "9"
+TAPI_ORDER_TYPE_GHOST = "A"
+TAPI_ORDER_TYPE_HKEX_AUCTION = "B"
+TAPI_ORDER_TYPE_SWAP = "C"
+TAPI_ORDER_SOURCE_SELF_ETRADER = "1"
+TAPI_ORDER_SOURCE_PROXY_ETRADER = "2"
+TAPI_ORDER_SOURCE_JTRADER = "3"
+TAPI_ORDER_SOURCE_MANUAL = "4"
+TAPI_ORDER_SOURCE_CARRY = "5"
+TAPI_ORDER_SOURCE_PROGRAM = "6"
+TAPI_ORDER_SOURCE_DELIVERY = "7"
+TAPI_ORDER_SOURCE_ABANDON = "8"
+TAPI_ORDER_SOURCE_CHANNEL = "9"
+TAPI_ORDER_TIMEINFORCE_GFD = "0"
+TAPI_ORDER_TIMEINFORCE_GTC = "1"
+TAPI_ORDER_TIMEINFORCE_GTD = "2"
+TAPI_ORDER_TIMEINFORCE_FAK = "3"
+TAPI_ORDER_TIMEINFORCE_FOK = "4"
+TAPI_SIDE_NONE = "N"
+TAPI_SIDE_BUY = "B"
+TAPI_SIDE_SELL = "S"
+TAPI_PositionEffect_NONE = "N"
+TAPI_PositionEffect_OPEN = "O"
+TAPI_PositionEffect_COVER = "C"
+TAPI_PositionEffect_COVER_TODAY = "T"
+TAPI_HEDGEFLAG_NONE = "N"
+TAPI_HEDGEFLAG_T = "T"
+TAPI_HEDGEFLAG_B = "B"
+TAPI_HEDGEFLAG_L = "L"
+TAPI_ORDER_STATE_SUBMIT = "0"
+TAPI_ORDER_STATE_ACCEPT = "1"
+TAPI_ORDER_STATE_TRIGGERING = "2"
+TAPI_ORDER_STATE_EXCTRIGGERING = "3"
+TAPI_ORDER_STATE_QUEUED = "4"
+TAPI_ORDER_STATE_PARTFINISHED = "5"
+TAPI_ORDER_STATE_FINISHED = "6"
+TAPI_ORDER_STATE_CANCELING = "7"
+TAPI_ORDER_STATE_MODIFYING = "8"
+TAPI_ORDER_STATE_CANCELED = "9"
+TAPI_ORDER_STATE_LEFTDELETED = "A"
+TAPI_ORDER_STATE_FAIL = "B"
+TAPI_ORDER_STATE_DELETED = "C"
+TAPI_ORDER_STATE_SUPPENDED = "D"
+TAPI_ORDER_STATE_DELETEDFOREXPIRE = "E"
+TAPI_ORDER_STATE_EFFECT = "F"
+TAPI_ORDER_STATE_APPLY = "G"
+TAPI_CALULATE_MODE_COMBINE = "0"
+TAPI_CALCULATE_MODE_PERCENTAGE = "1"
+TAPI_CALCULATE_MODE_QUOTA = "2"
+TAPI_CALCULATE_MODE_CHAPERCENTAGE = "3"
+TAPI_CALCULATE_MODE_CHAQUOTA = "4"
+TAPI_CALCULATE_MODE_DISCOUNT = "5"
+TAPI_MATCH_SOURCE_ALL = "0"
+TAPI_MATCH_SOURCE_SELF_ETRADER = "1"
+TAPI_MATCH_SOURCE_PROXY_ETRADER = "2"
+TAPI_MATCH_SOURCE_JTRADER = "3"
+TAPI_MATCH_SOURCE_MANUAL = "4"
+TAPI_MATCH_SOURCE_CARRY = "5"
+TAPI_MATCH_SOURCE_PROGRAM = "6"
+TAPI_MATCH_SOURCE_DELIVERY = "7"
+TAPI_MATCH_SOURCE_ABANDON = "8"
+TAPI_MATCH_SOURCE_CHANNEL = "9"
+TAPI_MATCH_SOURCE_ESUNNY_API = "A"
+TAPI_CLOSE_MODE_NONE = "N"
+TAPI_CLOSE_MODE_UNFINISHED = "U"
+TAPI_CLOSE_MODE_OPENCOVER = "C"
+TAPI_CLOSE_MODE_CLOSETODAY = "T"
+TAPI_FUTURES_ALG_ZHUBI = "1"
+TAPI_FUTURES_ALG_DINGSHI = "2"
+TAPI_OPTION_ALG_FUTURES = "1"
+TAPI_OPTION_ALG_OPTION = "2"
+SENDTYPE_SMS = "S"
+SENDTYPE_MAIL = "M"
+TAPI_LWFlag_L = "L"
+TAPI_LWFlag_W = "W"
+TAPI_CASHINOUT_MODE_FEEADJUST = "0"
+TAPI_CASHINOUT_MODE_YKADJUST = "1"
+TAPI_CASHINOUT_MODE_PLEDGE = "2"
+TAPI_CASHINOUT_MODE_INTERESTREVENUE = "3"
+TAPI_CASHINOUT_MODE_COLLECTIONCOST = "4"
+TAPI_CASHINOUT_MODE_OTHER = "5"
+TAPI_CASHINOUT_MODE_COMPANY = "6"
+TAPI_DEPOSITCALCULATE_MODE_FEN = "1"
+TAPI_DEPOSITCALCULATE_MODE_SUO = "2"
+TAPI_CMB_DIRECT_FIRST = "1"
+TAPI_CMB_DIRECT_SECOND = "2"
+TAPI_DELIVERY_MODE_GOODS = "G"
+TAPI_DELIVERY_MODE_CASH = "C"
+TAPI_DELIVERY_MODE_EXECUTE = "E"
+TAPI_DELIVERY_MODE_ABANDON = "A"
+TAPI_DELIVERY_MODE_HKF = "H"
+TAPI_CONTRACT_TYPE_TRADEQUOTE = "1"
+TAPI_CONTRACT_TYPE_QUOTE = "2"
+TAPI_TACTICS_TYPE_NONE = "N"
+TAPI_TACTICS_TYPE_READY = "M"
+TAPI_TACTICS_TYPE_ATUO = "A"
+TAPI_TACTICS_TYPE_CONDITION = "C"
+APIORDER_INSERT = "1"
+APIORDER_MODIFY = "2"
+APIORDER_DELETE = "3"
+APIORDER_SUSPEND = "4"
+APIORDER_ACTIVATE = "5"
+APIORDER_SYSTEM_DELETE = "6"
+TAPI_TRIGGER_CONDITION_NONE = "N"
+TAPI_TRIGGER_CONDITION_GREAT = "G"
+TAPI_TRIGGER_CONDITION_LITTLE = "L"
+TAPI_TRIGGER_PRICE_NONE = "N"
+TAPI_TRIGGER_PRICE_BUY = "B"
+TAPI_TRIGGER_PRICE_SELL = "S"
+TAPI_TRIGGER_PRICE_LAST = "L"
+TAPI_TRADE_STATE_BID = "1"
+TAPI_TRADE_STATE_MATCH = "2"
+TAPI_TRADE_STATE_CONTINUOUS = "3"
+TAPI_TRADE_STATE_PAUSED = "4"
+TAPI_TRADE_STATE_CLOSE = "5"
+TAPI_TRADE_STATE_DEALLAST = "6"
+TAPI_TRADE_STATE_GWDISCONNECT = "0"
+TAPI_TRADE_STATE_UNKNOWN = "N"
+TAPI_TRADE_STATE_INITIALIZE = "I"
+TAPI_TRADE_STATE_READY = "R"
+TAPI_NOTICE_IGNORE_NONE = 0x00000000
+TAPI_NOTICE_IGNORE_ALL = 0xFFFFFFFF
+TAPI_NOTICE_IGNORE_FUND = 0x00000001
+TAPI_NOTICE_IGNORE_ORDER = 0x00000002
+TAPI_NOTICE_IGNORE_FILL = 0x00000004
+TAPI_NOTICE_IGNORE_POSITION = 0x00000008
+TAPI_NOTICE_IGNORE_CLOSE = 0x00000010
+TAPI_NOTICE_IGNORE_POSITIONPROFIT = 0x00000020
+TAPI_ORDER_QRY_TYPE_ALL = "A"
+TAPI_ORDER_QRY_TYPE_UNENDED = "U"
+TAPI_MSG_RECEIVER_ACCOUNTNO = "1"
+TAPI_MSG_RECEIVER_ACCOUNTGROUPNO = "2"
+TAPI_MSG_RECEIVER_ATTRIBUTE = "3"
+TAPI_MSG_RECEIVER_USERNO = "4"
+TAPI_MSG_LEVEL_NORMAL = "1"
+TAPI_MSG_LEVEL_IMPORTANT = "2"
+TAPI_MSG_LEVEL_IMERGENCY = "3"
+TAPI_Msg_TYPE_MANAGER = "1"
+TAPI_Msg_TYPE_RISKCONTROL = "2"
+TAPI_BILL_DATE = "D"
+TAPI_BILL_MONTH = "M"
+TAPI_BILL_FILE_TXT = "T"
+TAPI_BILL_FILE_PDF = "F"
+SettleFlag_AutoSettle = "0"
+SettleFlagh_Manual = "2"
diff --git a/vnpy/api/tap/generator/tap_td_data_struct.py b/vnpy/api/tap/generator/tap_td_data_struct.py
new file mode 100644
index 0000000000..95cb932db6
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_data_struct.py
@@ -0,0 +1,946 @@
+TapAPITradeLoginAuth = {
+ "UserNo": "string",
+ "ISModifyPassword": "char",
+ "Password": "string",
+ "NewPassword": "string",
+}
+
+TapAPITradeLoginRspInfo = {
+ "UserNo": "string",
+ "UserType": "int",
+ "UserName": "string",
+ "ReservedInfo": "string",
+ "LastLoginIP": "string",
+ "LastLoginProt": "unsigned int",
+ "LastLoginTime": "string",
+ "LastLogoutTime": "string",
+ "TradeDate": "string",
+ "LastSettleTime": "string",
+ "StartTime": "string",
+ "InitTime": "string",
+}
+
+TapAPIRequestVertificateCodeRsp = {
+ "SecondSerialID": "string",
+ "Effective": "int",
+}
+
+TapAPIAccQryReq = {
+}
+
+TapAPIAccountInfo = {
+ "AccountNo": "string",
+ "AccountType": "char",
+ "AccountState": "char",
+ "AccountTradeRight": "char",
+ "CommodityGroupNo": "string",
+ "AccountShortName": "string",
+ "AccountEnShortName": "string",
+}
+
+TapAPINewOrder = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+ "OrderType": "char",
+ "OrderSource": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "IsRiskOrder": "char",
+ "OrderSide": "char",
+ "PositionEffect": "char",
+ "PositionEffect2": "char",
+ "InquiryNo": "string",
+ "HedgeFlag": "char",
+ "OrderPrice": "double",
+ "OrderPrice2": "double",
+ "StopPrice": "double",
+ "OrderQty": "unsigned int",
+ "OrderMinQty": "unsigned int",
+ "MinClipSize": "unsigned int",
+ "MaxClipSize": "unsigned int",
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "ClientID": "string",
+ "TacticsType": "char",
+ "TriggerCondition": "char",
+ "TriggerPriceType": "char",
+ "AddOneIsValid": "char",
+}
+
+TapAPIOrderInfo = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+ "OrderType": "char",
+ "OrderSource": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "IsRiskOrder": "char",
+ "OrderSide": "char",
+ "PositionEffect": "char",
+ "PositionEffect2": "char",
+ "InquiryNo": "string",
+ "HedgeFlag": "char",
+ "OrderPrice": "double",
+ "OrderPrice2": "double",
+ "StopPrice": "double",
+ "OrderQty": "unsigned int",
+ "OrderMinQty": "unsigned int",
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "MinClipSize": "unsigned int",
+ "MaxClipSize": "unsigned int",
+ "LicenseNo": "string",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "ClientOrderNo": "string",
+ "ClientID": "string",
+ "TacticsType": "char",
+ "TriggerCondition": "char",
+ "TriggerPriceType": "char",
+ "AddOneIsValid": "char",
+ "ClientLocalIP": "string",
+ "ClientMac": "string",
+ "ClientIP": "string",
+ "OrderStreamID": "unsigned int",
+ "UpperNo": "string",
+ "UpperChannelNo": "string",
+ "OrderLocalNo": "string",
+ "UpperStreamID": "unsigned int",
+ "OrderSystemNo": "string",
+ "OrderExchangeSystemNo": "string",
+ "OrderParentSystemNo": "string",
+ "OrderInsertUserNo": "string",
+ "OrderInsertTime": "string",
+ "OrderCommandUserNo": "string",
+ "OrderUpdateUserNo": "string",
+ "OrderUpdateTime": "string",
+ "OrderState": "char",
+ "OrderMatchPrice": "double",
+ "OrderMatchPrice2": "double",
+ "OrderMatchQty": "unsigned int",
+ "OrderMatchQty2": "unsigned int",
+ "ErrorCode": "unsigned int",
+ "ErrorText": "string",
+ "IsBackInput": "char",
+ "IsDeleted": "char",
+ "IsAddOne": "char",
+}
+
+TapAPIOrderInfoNotice = {
+ "SessionID": "unsigned int",
+ "ErrorCode": "unsigned int",
+ "OrderInfo": "dict",
+}
+
+TapAPIOrderActionRsp = {
+ "ActionType": "char",
+ "OrderInfo": "dict",
+}
+
+TapAPIAmendOrder = {
+ "ReqData": "dict",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIOrderCancelReq = {
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIOrderDeactivateReq = TapAPIOrderCancelReq
+TapAPIOrderActivateReq = TapAPIOrderCancelReq
+TapAPIOrderDeleteReq = TapAPIOrderCancelReq
+TapAPIOrderQryReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "OrderType": "char",
+ "OrderSource": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "IsRiskOrder": "char",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "IsBackInput": "char",
+ "IsDeleted": "char",
+ "IsAddOne": "char",
+}
+
+TapAPIOrderProcessQryReq = {
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIFillQryReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSource": "char",
+ "MatchSide": "char",
+ "PositionEffect": "char",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "UpperNo": "string",
+ "IsDeleted": "char",
+ "IsAddOne": "char",
+}
+
+TapAPIFillInfo = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSource": "char",
+ "MatchSide": "char",
+ "PositionEffect": "char",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "OrderSystemNo": "string",
+ "MatchNo": "string",
+ "UpperMatchNo": "string",
+ "ExchangeMatchNo": "string",
+ "MatchDateTime": "string",
+ "UpperMatchDateTime": "string",
+ "UpperNo": "string",
+ "MatchPrice": "double",
+ "MatchQty": "unsigned int",
+ "IsDeleted": "char",
+ "IsAddOne": "char",
+ "FeeCurrencyGroup": "string",
+ "FeeCurrency": "string",
+ "FeeValue": "double",
+ "IsManualFee": "char",
+ "ClosePrositionPrice": "double",
+}
+
+TapAPICloseQryReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+}
+
+TapAPICloseInfo = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "CloseSide": "char",
+ "CloseQty": "unsigned int",
+ "OpenPrice": "double",
+ "ClosePrice": "double",
+ "OpenMatchNo": "string",
+ "OpenMatchDateTime": "string",
+ "CloseMatchNo": "string",
+ "CloseMatchDateTime": "string",
+ "CloseStreamId": "unsigned int",
+ "CommodityCurrencyGroup": "string",
+ "CommodityCurrency": "string",
+ "CloseProfit": "double",
+}
+
+TapAPIPositionQryReq = {
+ "AccountNo": "string",
+}
+
+TapAPIPositionInfo = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSide": "char",
+ "HedgeFlag": "char",
+ "PositionNo": "string",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "MatchNo": "string",
+ "UpperNo": "string",
+ "PositionPrice": "double",
+ "PositionQty": "unsigned int",
+ "PositionStreamId": "unsigned int",
+ "CommodityCurrencyGroup": "string",
+ "CommodityCurrency": "string",
+ "CalculatePrice": "double",
+ "AccountInitialMargin": "double",
+ "AccountMaintenanceMargin": "double",
+ "UpperInitialMargin": "double",
+ "UpperMaintenanceMargin": "double",
+ "PositionProfit": "double",
+ "LMEPositionProfit": "double",
+ "OptionMarketValue": "double",
+ "IsHistory": "char",
+}
+
+TapAPIPositionProfit = {
+ "PositionNo": "string",
+ "PositionStreamId": "unsigned int",
+ "PositionProfit": "double",
+ "LMEPositionProfit": "double",
+ "OptionMarketValue": "double",
+ "CalculatePrice": "double",
+}
+
+TapAPIPositionProfitNotice = {
+ "IsLast": "char",
+ "Data": "dict",
+}
+
+TapAPIPositionSummary = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSide": "char",
+ "PositionPrice": "double",
+ "PositionQty": "unsigned int",
+ "HisPositionQty": "unsigned int",
+}
+
+TapAPIFundReq = {
+ "AccountNo": "string",
+}
+
+TapAPIFundData = {
+ "AccountNo": "string",
+ "CurrencyGroupNo": "string",
+ "CurrencyNo": "string",
+ "TradeRate": "double",
+ "FutureAlg": "char",
+ "OptionAlg": "char",
+ "PreBalance": "double",
+ "PreUnExpProfit": "double",
+ "PreLMEPositionProfit": "double",
+ "PreEquity": "double",
+ "PreAvailable1": "double",
+ "PreMarketEquity": "double",
+ "CashInValue": "double",
+ "CashOutValue": "double",
+ "CashAdjustValue": "double",
+ "CashPledged": "double",
+ "FrozenFee": "double",
+ "FrozenDeposit": "double",
+ "AccountFee": "double",
+ "SwapInValue": "double",
+ "SwapOutValue": "double",
+ "PremiumIncome": "double",
+ "PremiumPay": "double",
+ "CloseProfit": "double",
+ "FrozenFund": "double",
+ "UnExpProfit": "double",
+ "ExpProfit": "double",
+ "PositionProfit": "double",
+ "LmePositionProfit": "double",
+ "OptionMarketValue": "double",
+ "AccountIntialMargin": "double",
+ "AccountMaintenanceMargin": "double",
+ "UpperInitalMargin": "double",
+ "UpperMaintenanceMargin": "double",
+ "Discount": "double",
+ "Balance": "double",
+ "Equity": "double",
+ "Available": "double",
+ "CanDraw": "double",
+ "MarketEquity": "double",
+ "AuthMoney": "double",
+}
+
+TapAPICommodityInfo = {
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "CommodityName": "string",
+ "CommodityEngName": "string",
+ "RelateExchangeNo": "string",
+ "RelateCommodityType": "char",
+ "RelateCommodityNo": "string",
+ "RelateExchangeNo2": "string",
+ "RelateCommodityType2": "char",
+ "RelateCommodityNo2": "string",
+ "CurrencyGroupNo": "string",
+ "TradeCurrency": "string",
+ "ContractSize": "double",
+ "OpenCloseMode": "char",
+ "StrikePriceTimes": "double",
+ "CommodityTickSize": "double",
+ "CommodityDenominator": "int",
+ "CmbDirect": "char",
+ "DeliveryMode": "char",
+ "DeliveryDays": "int",
+ "AddOneTime": "string",
+ "CommodityTimeZone": "int",
+ "IsAddOne": "char",
+}
+
+TapAPITradeContractInfo = {
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo1": "string",
+ "StrikePrice1": "string",
+ "CallOrPutFlag1": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+ "ContractType": "char",
+ "QuoteUnderlyingContract": "string",
+ "ContractName": "string",
+ "ContractExpDate": "string",
+ "LastTradeDate": "string",
+ "FirstNoticeDate": "string",
+}
+
+TapAPICurrencyInfo = {
+ "CurrencyNo": "string",
+ "CurrencyGroupNo": "string",
+ "TradeRate": "double",
+ "TradeRate2": "double",
+ "FutureAlg": "char",
+ "OptionAlg": "char",
+}
+
+TapAPITradeMessageReq = {
+ "AccountNo": "string",
+ "AccountAttributeNo": "string",
+ "BenginSendDateTime": "string",
+ "EndSendDateTime": "string",
+}
+
+TapAPITradeMessage = {
+ "SerialID": "unsigned int",
+ "AccountNo": "string",
+ "TMsgValidDateTime": "string",
+ "TMsgTitle": "string",
+ "TMsgContent": "string",
+ "TMsgType": "char",
+ "TMsgLevel": "char",
+ "IsSendBySMS": "char",
+ "IsSendByEMail": "char",
+ "Sender": "string",
+ "SendDateTime": "string",
+}
+
+TapAPIBillQryReq = {
+ "UserNo": "string",
+ "BillType": "char",
+ "BillDate": "string",
+ "BillFileType": "char",
+}
+
+TapAPIBillQryRsp = {
+ "Reqdata": "dict",
+ "BillLen": "int",
+ "BillText": "char",
+}
+
+TapAPIHisOrderQryReq = {
+ "AccountNo": "string",
+ "AccountAttributeNo": "string",
+ "BeginDate": "string",
+ "EndDate": "string",
+}
+
+TapAPIHisOrderQryRsp = {
+ "Date": "string",
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+ "OrderType": "char",
+ "OrderSource": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "IsRiskOrder": "char",
+ "OrderSide": "char",
+ "PositionEffect": "char",
+ "PositionEffect2": "char",
+ "InquiryNo": "string",
+ "HedgeFlag": "char",
+ "OrderPrice": "double",
+ "OrderPrice2": "double",
+ "StopPrice": "double",
+ "OrderQty": "unsigned int",
+ "OrderMinQty": "unsigned int",
+ "OrderCanceledQty": "unsigned int",
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+ "OrderStreamID": "unsigned int",
+ "UpperNo": "string",
+ "UpperChannelNo": "string",
+ "OrderLocalNo": "string",
+ "UpperStreamID": "unsigned int",
+ "OrderSystemNo": "string",
+ "OrderExchangeSystemNo": "string",
+ "OrderParentSystemNo": "string",
+ "OrderInsertUserNo": "string",
+ "OrderInsertTime": "string",
+ "OrderCommandUserNo": "string",
+ "OrderUpdateUserNo": "string",
+ "OrderUpdateTime": "string",
+ "OrderState": "char",
+ "OrderMatchPrice": "double",
+ "OrderMatchPrice2": "double",
+ "OrderMatchQty": "unsigned int",
+ "OrderMatchQty2": "unsigned int",
+ "ErrorCode": "unsigned int",
+ "ErrorText": "string",
+ "IsBackInput": "char",
+ "IsDeleted": "char",
+ "IsAddOne": "char",
+ "AddOneIsValid": "char",
+ "MinClipSize": "unsigned int",
+ "MaxClipSize": "unsigned int",
+ "LicenseNo": "string",
+ "TacticsType": "char",
+ "TriggerCondition": "char",
+ "TriggerPriceType": "char",
+}
+
+TapAPIHisMatchQryReq = {
+ "AccountNo": "string",
+ "AccountAttributeNo": "string",
+ "BeginDate": "string",
+ "EndDate": "string",
+ "CountType": "char",
+}
+
+TapAPIHisMatchQryRsp = {
+ "SettleDate": "string",
+ "TradeDate": "string",
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSource": "char",
+ "MatchSide": "char",
+ "PositionEffect": "char",
+ "HedgeFlag": "char",
+ "MatchPrice": "double",
+ "MatchQty": "unsigned int",
+ "OrderNo": "string",
+ "MatchNo": "string",
+ "MatchStreamID": "unsigned int",
+ "UpperNo": "string",
+ "MatchCmbNo": "string",
+ "ExchangeMatchNo": "string",
+ "MatchUpperStreamID": "unsigned int",
+ "CommodityCurrencyGroup": "string",
+ "CommodityCurrency": "string",
+ "Turnover": "double",
+ "PremiumIncome": "double",
+ "PremiumPay": "double",
+ "AccountFee": "double",
+ "AccountFeeCurrencyGroup": "string",
+ "AccountFeeCurrency": "string",
+ "IsManualFee": "char",
+ "AccountOtherFee": "double",
+ "UpperFee": "double",
+ "UpperFeeCurrencyGroup": "string",
+ "UpperFeeCurrency": "string",
+ "IsUpperManualFee": "char",
+ "UpperOtherFee": "double",
+ "MatchDateTime": "string",
+ "UpperMatchDateTime": "string",
+ "CloseProfit": "double",
+ "ClosePrice": "double",
+ "CloseQty": "unsigned int",
+ "SettleGroupNo": "string",
+ "OperatorNo": "string",
+ "OperateTime": "string",
+}
+
+TapAPIHisOrderProcessQryReq = {
+ "Date": "string",
+ "OrderNo": "string",
+}
+
+TapAPIHisOrderProcessQryRsp = TapAPIHisOrderQryRsp
+TapAPIHisPositionQryReq = {
+ "AccountNo": "string",
+ "AccountAttributeNo": "dict",
+ "Date": "string",
+ "CountType": "dict",
+ "SettleFlag": "char",
+}
+
+TapAPIHisPositionQryRsp = {
+ "SettleDate": "string",
+ "OpenDate": "string",
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSide": "char",
+ "HedgeFlag": "char",
+ "PositionPrice": "double",
+ "PositionQty": "unsigned int",
+ "OrderNo": "string",
+ "PositionNo": "string",
+ "UpperNo": "string",
+ "CurrencyGroup": "string",
+ "Currency": "string",
+ "PreSettlePrice": "double",
+ "SettlePrice": "double",
+ "PositionDProfit": "double",
+ "LMEPositionProfit": "double",
+ "OptionMarketValue": "double",
+ "AccountInitialMargin": "double",
+ "AccountMaintenanceMargin": "double",
+ "UpperInitialMargin": "double",
+ "UpperMaintenanceMargin": "double",
+ "SettleGroupNo": "string",
+}
+
+TapAPIHisDeliveryQryReq = {
+ "AccountNo": "string",
+ "AccountAttributeNo": "string",
+ "BeginDate": "string",
+ "EndDate": "string",
+ "CountType": "char",
+}
+
+TapAPIHisDeliveryQryRsp = {
+ "DeliveryDate": "string",
+ "OpenDate": "string",
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSource": "char",
+ "OpenSide": "char",
+ "OpenPrice": "double",
+ "DeliveryPrice": "double",
+ "DeliveryQty": "unsigned int",
+ "FrozenQty": "unsigned int",
+ "OpenNo": "string",
+ "UpperNo": "string",
+ "CommodityCurrencyGroupy": "string",
+ "CommodityCurrency": "string",
+ "PreSettlePrice": "double",
+ "DeliveryProfit": "double",
+ "AccountFrozenInitialMargin": "double",
+ "AccountFrozenMaintenanceMargin": "double",
+ "UpperFrozenInitialMargin": "double",
+ "UpperFrozenMaintenanceMargin": "double",
+ "AccountFeeCurrencyGroup": "string",
+ "AccountFeeCurrency": "string",
+ "AccountDeliveryFee": "double",
+ "UpperFeeCurrencyGroup": "string",
+ "UpperFeeCurrency": "string",
+ "UpperDeliveryFee": "double",
+ "DeliveryMode": "char",
+ "OperatorNo": "string",
+ "OperateTime": "string",
+ "SettleGourpNo": "string",
+}
+
+TapAPIAccountCashAdjustQryReq = {
+ "SerialID": "unsigned int",
+ "AccountNo": "string",
+ "AccountAttributeNo": "string",
+ "BeginDate": "string",
+ "EndDate": "string",
+}
+
+TapAPIAccountCashAdjustQryRsp = {
+ "Date": "string",
+ "AccountNo": "string",
+ "CashAdjustType": "char",
+ "CurrencyGroupNo": "string",
+ "CurrencyNo": "string",
+ "CashAdjustValue": "double",
+ "CashAdjustRemark": "string",
+ "OperateTime": "string",
+ "OperatorNo": "string",
+ "AccountBank": "string",
+ "BankAccount": "string",
+ "AccountLWFlag": "char",
+ "CompanyBank": "string",
+ "InternalBankAccount": "string",
+ "CompanyLWFlag": "char",
+}
+
+TapAPIAccountFeeRentQryReq = {
+ "AccountNo": "string",
+}
+
+TapAPIAccountFeeRentQryRsp = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "MatchSource": "char",
+ "CalculateMode": "char",
+ "CurrencyGroupNo": "string",
+ "CurrencyNo": "string",
+ "OpenCloseFee": "double",
+ "CloseTodayFee": "double",
+}
+
+TapAPIAccountMarginRentQryReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+}
+
+TapAPIAccountMarginRentQryRsp = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "CalculateMode": "char",
+ "CurrencyGroupNo": "string",
+ "CurrencyNo": "string",
+ "InitialMargin": "double",
+ "MaintenanceMargin": "double",
+ "SellInitialMargin": "double",
+ "SellMaintenanceMargin": "double",
+ "LockMargin": "double",
+}
+
+TapAPIOrderQuoteMarketNotice = {
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "OrderSide": "char",
+ "OrderQty": "unsigned int",
+}
+
+TapAPIOrderMarketInsertReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "OrderType": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "OrderSource": "char",
+ "BuyPositionEffect": "char",
+ "SellPositionEffect": "char",
+ "AddOneIsValid": "char",
+ "OrderBuyPrice": "double",
+ "OrderSellPrice": "double",
+ "OrderBuyQty": "unsigned int",
+ "OrderSellQty": "unsigned int",
+ "ClientBuyOrderNo": "string",
+ "ClientSellOrderNo": "string",
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "Remark": "string",
+}
+
+TapAPIOrderMarketInsertRsp = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "OrderType": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "OrderSource": "char",
+ "BuyPositionEffect": "char",
+ "SellPositionEffect": "char",
+ "OrderBuyPrice": "double",
+ "OrderSellPrice": "double",
+ "OrderBuyQty": "unsigned int",
+ "OrderSellQty": "unsigned int",
+ "ServerFlag": "char",
+ "OrderBuyNo": "string",
+ "OrderSellNo": "string",
+ "AddOneIsValid": "char",
+ "OrderMarketUserNo": "string",
+ "OrderMarketTime": "string",
+ "RefInt": "int",
+ "RefDouble": "double",
+ "RefString": "string",
+ "ClientBuyOrderNo": "string",
+ "ClientSellOrderNo": "string",
+ "ErrorCode": "unsigned int",
+ "ErrorText": "string",
+ "ClientLocalIP": "string",
+ "ClientMac": "string",
+ "ClientIP": "string",
+ "Remark": "string",
+}
+
+TapAPIOrderMarketDeleteReq = {
+ "ServerFlag": "char",
+ "OrderBuyNo": "string",
+ "OrderSellNo": "string",
+}
+
+TapAPIOrderMarketDeleteRsp = TapAPIOrderMarketInsertRsp
+TapAPIOrderLocalRemoveReq = {
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIOrderLocalRemoveRsp = {
+ "req": "dict",
+ "ClientLocalIP": "string",
+ "ClientMac": "string",
+ "ClientIP": "string",
+}
+
+TapAPIOrderLocalInputReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "ContractNo2": "string",
+ "StrikePrice2": "string",
+ "CallOrPutFlag2": "char",
+ "OrderType": "char",
+ "OrderSource": "char",
+ "TimeInForce": "char",
+ "ExpireTime": "string",
+ "IsRiskOrder": "char",
+ "OrderSide": "char",
+ "PositionEffect": "char",
+ "PositionEffect2": "char",
+ "InquiryNo": "string",
+ "HedgeFlag": "char",
+ "OrderPrice": "double",
+ "OrderPrice2": "double",
+ "StopPrice": "double",
+ "OrderQty": "unsigned int",
+ "OrderMinQty": "unsigned int",
+ "OrderSystemNo": "string",
+ "OrderExchangeSystemNo": "string",
+ "UpperNo": "string",
+ "OrderMatchPrice": "double",
+ "OrderMatchPrice2": "double",
+ "OrderMatchQty": "unsigned int",
+ "OrderMatchQty2": "unsigned int",
+ "OrderState": "char",
+ "IsAddOne": "char",
+}
+
+TapAPIOrderLocalInputRsp = TapAPIOrderInfo
+TapAPIOrderLocalModifyReq = {
+ "req": "dict",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIOrderLocalModifyRsp = TapAPIOrderInfo
+TapAPIOrderLocalTransferReq = {
+ "AccountNo": "string",
+ "ServerFlag": "char",
+ "OrderNo": "string",
+}
+
+TapAPIOrderLocalTransferRsp = TapAPIOrderInfo
+TapAPIFillLocalInputReq = {
+ "AccountNo": "string",
+ "ExchangeNo": "string",
+ "CommodityType": "char",
+ "CommodityNo": "string",
+ "ContractNo": "string",
+ "StrikePrice": "string",
+ "CallOrPutFlag": "char",
+ "MatchSide": "char",
+ "PositionEffect": "char",
+ "HedgeFlag": "char",
+ "MatchPrice": "double",
+ "MatchQty": "unsigned int",
+ "OrderSystemNo": "string",
+ "UpperMatchNo": "string",
+ "MatchDateTime": "string",
+ "UpperMatchDateTime": "string",
+ "UpperNo": "string",
+ "IsAddOne": "char",
+ "FeeCurrencyGroup": "string",
+ "FeeCurrency": "string",
+ "FeeValue": "double",
+ "IsManualFee": "char",
+ "ClosePositionPrice": "double",
+}
+
+TapAPIFillLocalInputRsp = TapAPIFillLocalInputReq
+TapAPIFillLocalRemoveReq = {
+ "ServerFlag": "char",
+ "MatchNo": "string",
+}
+
+TapAPIFillLocalRemoveRsp = TapAPIFillLocalRemoveReq
+TapAPITradingCalendarQryRsp = {
+ "CurrTradeDate": "string",
+ "LastSettlementDate": "string",
+ "PromptDate": "string",
+ "LastPromptDate": "string",
+}
diff --git a/vnpy/api/tap/generator/tap_td_data_typedef.py b/vnpy/api/tap/generator/tap_td_data_typedef.py
new file mode 100644
index 0000000000..c50282f38d
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_data_typedef.py
@@ -0,0 +1,48 @@
+TAPIAccountType = "char"
+TAPIRightIDType = "int"
+TAPIUserTypeType = "int"
+TAPIAccountState = "char"
+TAPIAccountRightType = "char"
+TAPIOrderTypeType = "char"
+TAPIOrderSourceType = "char"
+TAPITimeInForceType = "char"
+TAPISideType = "char"
+TAPIPositionEffectType = "char"
+TAPIHedgeFlagType = "char"
+TAPIOrderStateType = "char"
+TAPICalculateModeType = "char"
+TAPIMatchSourceType = "char"
+TAPIOpenCloseModeType = "char"
+TAPIFutureAlgType = "char"
+TAPIOptionAlgType = "char"
+TAPISendType = "char"
+TAPIBankAccountLWFlagType = "char"
+TAPICashAdjustTypeType = "char"
+TAPIMarginCalculateModeType = "char"
+TAPIOptionMarginCalculateModeType = "char"
+TAPICmbDirectType = "char"
+TAPIDeliveryModeType = "char"
+TAPIContractTypeType = "char"
+TAPITacticsTypeType = "char"
+TAPIORDERACT = "char"
+TAPITriggerConditionType = "char"
+TAPITriggerPriceTypeType = "char"
+TAPITradingStateType = "char"
+TAPINoticeIgnoreFlagType = "unsigned int"
+TAPIOrderQryTypeType = "char"
+TapAPIOrderDeactivateReq = "dict"
+TapAPIOrderActivateReq = "dict"
+TapAPIOrderDeleteReq = "dict"
+TAPIMsgReceiverType = "char"
+TAPIMsgLevelType = "char"
+TAPIMsgTypeType = "char"
+TAPIBillTypeType = "char"
+TAPIBillFileTypeType = "char"
+TapAPIHisOrderProcessQryRsp = "dict"
+TAPISettleFlagType = "char"
+TapAPIOrderMarketDeleteRsp = "dict"
+TapAPIOrderLocalInputRsp = "dict"
+TapAPIOrderLocalModifyRsp = "dict"
+TapAPIOrderLocalTransferRsp = "dict"
+TapAPIFillLocalInputRsp = "dict"
+TapAPIFillLocalRemoveRsp = "dict"
diff --git a/vnpy/api/tap/generator/tap_td_error_constant.py b/vnpy/api/tap/generator/tap_td_error_constant.py
new file mode 100644
index 0000000000..6a2d41905f
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_error_constant.py
@@ -0,0 +1,235 @@
+TAPIERROR_LOGIN = 10001
+TAPIERROR_LOGIN_USER = 10002
+TAPIERROR_LOGIN_DDA = 10003
+TAPIERROR_LOGIN_LICENSE = 10004
+TAPIERROR_LOGIN_MODULE = 10005
+TAPIERROR_LOGIN_FORCE = 10006
+TAPIERROR_LOGIN_STATE = 10007
+TAPIERROR_LOGIN_PASS = 10008
+TAPIERROR_LOGIN_RIGHT = 10009
+TAPIERROR_LOGIN_COUNT = 10010
+TAPIERROR_LOGIN_NOTIN_SERVERFLAGUSRES = 10011
+TAPIERROR_LOGIN_FREEZE = 10012
+TAPIERROR_LOGIN_TOFREEZE = 10013
+TAPIERROR_LOGIN_ACCOUNTSTATE = 10014
+TAPIERROR_LOGIN_SECCERTIFI = 10015
+TAPIERROR_LOGIN_NOSECONDSET = 10016
+TAPIERROR_LOGIN_NOTURSTHOST = 10017
+TAPITAPIERROR_SECONDCERTIFICATION_FAIL = 14001
+TAPITAPIERROR_SECONDCERTIFICATION_TIMEOVER = 14002
+TAPIERROR_CONN_DATABASE = 11000
+TAPIERROR_OPER_DATABASE = 11001
+TAPIERROR_NEED_ONETOONE = 11002
+TAPIERROR_EXIST_RELATEINFO = 11003
+TAPIERROR_EXIST_RELATEINFOOFGROUP = 11004
+TAPIERROR_USERPASSWORD_MOD_SOURCE = 12001
+TAPIERROR_USERPASSWORD_MOD_SAME = 12002
+TAPIERROR_USERPASSWORD_MOD_COMPLEXITY = 12003
+TAPIERROR_CURRENCY_ONLY_ONEBASE = 13001
+TAPIERROR_CURRENCY_ONLY_USDHKD = 13002
+TAPIERROR_ORDERINSERT_ACCOUNT = 60001
+TAPIERROR_ORDERINSERT_ACCOUNT_STATE = 60002
+TAPIERROR_ORDERINSERT_TRADECENT_ERROR = 60003
+TAPIERROR_ORDERINSERT_CONTRACT = 60011
+TAPIERROR_ORDERINSERT_LME_NOTREADY = 60012
+TAPIERROR_ORDERINSERT_ERROR_ORDER_TYPE = 60013
+TAPIERROR_ORDERINSERT_READY_TYPE_ERROR = 60014
+TAPIERROR_ORDERINSERT_ORDER_TYPE_ERROR = 60015
+TAPIERROR_ORDER_NOTRADE_ACCOUNT = 60021
+TAPIERROR_ORDER_NOTRADE_COM_GROUP = 60022
+TAPIERROR_ORDER_NOTRADE_ACC_CONTRACT = 60023
+TAPIERROR_ORDER_NOTRADE_SYSTEM = 60024
+TAPIERROR_ORDER_CLOSE_ACCOUNT = 60025
+TAPIERROR_ORDER_CLOSE_ACC_CONTRACT = 60026
+TAPIERROR_ORDER_CLOSE_SYSTEM = 60027
+TAPIERROR_ORDER_CLOSE_DAYS = 60028
+TAPIERROR_ORDER_NOTRADE_RISK = 60029
+TAPIERROR_ORDER_CLOSE_RISK = 60030
+TAPIERROR_ORDERINSERT_POSITIONMAX = 60031
+TAPIERROR_ORDERINSERT_ONCEMAX = 60032
+TAPIERROR_ORDERINSERT_TRADEROUTE = 60033
+TAPIERROR_ORDER_IN_MOD_PRICE_ERROR = 60034
+TAPIERROR_ORDER_IN_GIVEUP_POS_MAX = 60035
+TAPIERROR_UPPERCHANNEL_NOT_LOGIN = 60041
+TAPIERROR_UPPERCHANNEL_NOT_FOUND = 60042
+TAPIERROR_ORDERINSERT_NOTENOUGHFUND = 60051
+TAPIERROR_ORDERINSERT_FEE = 60052
+TAPIERROR_ORDERINSERT_MARGIN = 60053
+TAPIERROR_ORDERINSERT_BASENOFUND = 60054
+TAPIERROR_ORDERINSERT_MARGINAMOUNT = 60055
+TAPIERROR_ORDERINSERT_OPENRATIO = 60056
+TAPIERROR_ORDERINSERT_GROUP_OPENRATIO = 60057
+TAPIERROR_ORDERINSERT_RISKARRAY = 60058
+TAPIERROR_ORDERDELETE_NOT_SYSNO = 60061
+TAPIERROR_ORDERDELETE_NOT_STATE = 60062
+TAPIERROR_ORDERDELETE_NO_INPUT = 60063
+TAPIERROR_ORDERMODIFY_NOT_STATE = 60071
+TAPIERROR_ORDERMODIFY_BACK_INPUT = 60072
+TAPIERROR_ORDERMODIFY_RISK_ORDER = 60073
+TAPIERROR_ORDERMODIFY_ERROR_QTY = 60074
+TAPIERROR_ORDERMODIFY_ERROR_READY = 60075
+TAPIERROR_ORDERINPUT_CANNOTMOVE = 60081
+TAPIERROR_ORDERINPUT_REPEAT = 60091
+TAPIERROR_CONTRACT_QUOTE = 60101
+TAPIERROR_UPPER_ONCEMAX = 60111
+TAPIERROR_UPPER_POSITIONMAX = 60112
+TAPIERROR_ORDERINSERT_CLOSEMODE = 60121
+TAPIERROR_CLOSE_ORDER = 60122
+TAPIERROR_CLOSE_MATCH = 60123
+TAPIERROR_MOD_DEL_NO_ORDER = 60131
+TAPIERROR_MOD_DEL_GATEWAY_DISCON = 60132
+TAPIERROR_MATCHINPUT_REPEAT = 60141
+TAPIERROR_MATCHINPUT_NO_ORDER = 60142
+TAPIERROR_MATCHINPUT_NO_CONTRACT = 60143
+TAPIERROR_MATCHINPUT_PARM_ERROR = 60144
+TAPIERROR_MATCHINPUT_OSTATE_ERROR = 60145
+TAPIERROR_MATCHREMOVE_NO_MATCH = 60151
+TAPIERROR_MATCHREMOVE_STATE_ERROR = 60152
+TAPIERROR_ORDERINPUT_STATE_ERROR = 60161
+TAPIERROR_ORDERINPUT_MOD_ERROR = 60162
+TAPIERROR_ORDERREMOVE_ERROR = 60163
+TAPIERROR_ORDERINPUT_MOD_STATE_ERROR = 60164
+TAPIERROR_ORDEREXCHANGE_STATE_ERROR = 60165
+TAPIERROR_ORDERREMOVE_NOT_ERROR = 60166
+TAPIERROR_ORDERMARKET_DELETE_NOTFOUND = 60171
+TAPIERROR_ORDERMARKET_DEL_ACCOUNT_NE = 60172
+TAPIERROR_ORDERMARKET_DEL_COMMODITY_NE = 60173
+TAPIERROR_ORDERMARKET_DEL_CONTRACT_NE = 60174
+TAPIERROR_ORDERMARKET_DEL_SIDE_EQ = 60175
+TAPIERROR_ORDERMARKET_DEL_SIDE_ERROR = 60176
+TAPIERROR_ORDERMARKET_OTHER_SIDE_ERROR = 60177
+TAPIERROR_ORDERACTIVATE_NOTFOUND_ERROR = 60181
+TAPIERROR_ORDERACTIVATE_STATE_ERROR = 60182
+TAPIERROR_GW_NOT_READY = 80001
+TAPIERROR_GW_INVALID_COMMODITY = 80002
+TAPIERROR_GW_INVALID_CONTRACT = 80003
+TAPIERROR_GW_INVALID_FIELD = 80004
+TAPIERROR_GW_INVALID_PRICE = 80005
+TAPIERROR_GW_INVALID_VOLUME = 80006
+TAPIERROR_GW_INVALID_TYPE = 80007
+TAPIERROR_GW_INVALID_MODE = 80008
+TAPIERROR_GW_ORDER_NOT_EXIST = 80009
+TAPIERROR_GW_SEND_FAIL = 80010
+TAPIERROR_GW_REJ_BYUPPER = 80011
+TAPIERROR_TRADEFRONT_MODULETYPEERR = 90001
+TAPIERROR_TRADEFRONT_TOOMANYDATA = 90002
+TAPIERROR_TRADEFRONT_NODATA = 90003
+TAPIERROT_TRADEFRONT_NOUSER = 90004
+TAPIERROR_TRADEFRONT_DISCONNECT_TRADE = 90011
+TAPIERROR_TRADEFRONT_DISCONNECT_MANAGE = 90012
+TAPIERROR_TRADEFRONT_ACCOUNT = 90021
+TAPIERROR_TRADEFRONT_ORDER = 90022
+TAPIERROR_TRADEFRONT_FREQUENCY = 90023
+TAPIERROR_TRADEFRONT_RUFUSE = 90024
+TAPIERROR_TRADEFRONT_SELFMATCH = 90025
+TAPIERROR_SUCCEED = 0
+TAPIERROR_ConnectFail = -1
+TAPIERROR_LinkAuthFail = -2
+TAPIERROR_HostUnavailable = -3
+TAPIERROR_SendDataError = -4
+TAPIERROR_TestIDError = -5
+TAPIERROR_NotReadyTestNetwork = -6
+TAPIERROR_CurTestNotOver = -7
+TAPIERROR_NOFrontAvailable = -8
+TAPIERROR_DataPathAvaiable = -9
+TAPIERROR_RepeatLogin = -10
+TAPIERROR_InnerError = -11
+TAPIERROR_LastReqNotFinish = -12
+TAPIERROR_InputValueError = -13
+TAPIERROR_AuthCode_Invalid = -14
+TAPIERROR_AuthCode_Expired = -15
+TAPIERROR_AuthCode_TypeNotMatch = -16
+TAPIERROR_API_NotReady = -17
+TAPIERROR_UDP_LISTEN_FAILED = -18
+TAPIERROR_UDP_LISTENING = -19
+TAPIERROR_NotImplemented = -20
+TAPIERROR_CallOneTimeOnly = -21
+TAPIERROR_ORDER_FREQUENCY = -22
+TAPIERROR_RENTQRY_TOOFAST = -23
+TAPIERROR_CALL_NOCONDITION = -24
+TAPIERROR_ORDER_NOTFOUND = -25
+TAPIERROR_LOGPATH_EMPTY = -26
+TAPIERROR_LOGPATH_FAILOPEN = -27
+TAPIERROR_RIGHT_TRADER = -28
+TAPIERROR_RIGHT_ORDERINPUT = -29
+TAPIERROR_RIGHT_LOCALOPERATION = -30
+TAPIERROR_RIGHT_ORDERTRANSFER = -31
+TAPIERROR_FILLINPUT_SYSTEMNO = -32
+TAPIERROR_FILLREMOVE_MATCHNO = -33
+TAPIERROR_FILLREQMOVE_NOFUND = -34
+TAPIERROR_LOCALMODIFY_ACCOUNT = -35
+TAPIERROR_LOCALTRANSFER_ACCOUNT = -36
+TAPIERROR_INPUTERROR_PHONE = -37
+TAPIERROR_ERROR_CONTACT = -38
+TAPIERROR_ERROR_REJESTVERTIFICATE = -39
+TAPIERROR_RIGHT_SETPASSWORD = -40
+TAPIERROR_RISK_OPERERROR = -41
+TAPIERROR_ORDER_MODACCOUNT = -42
+TAPIERROR_INPUTERROR_NULL = -10000
+TAPIERROR_INPUTERROR_TAPIYNFLAG = -10001
+TAPIERROR_INPUTERROR_TAPILOGLEVEL = -10002
+TAPIERROR_INPUTERROR_TAPICommodityType = -10003
+TAPIERROR_INPUTERROR_TAPICallOrPutFlagType = -10004
+TAPIERROR_INPUTERROR_TAPIBucketDateFlag = -11001
+TAPIERROR_INPUTERROR_TAPIHisQuoteType = -11002
+TAPIERROR_INPUTERROR_TAPIAccountType = -12001
+TAPIERROR_INPUTERROR_TAPIUserTypeType = -12002
+TAPIERROR_INPUTERROR_TAPIAccountState = -12003
+TAPIERROR_INPUTERROR_TAPIAccountFamilyType = -12004
+TAPIERROR_INPUTERROR_TAPIOrderTypeType = -12005
+TAPIERROR_INPUTERROR_TAPIOrderSourceType = -12006
+TAPIERROR_INPUTERROR_TAPITimeInForceType = -12007
+TAPIERROR_INPUTERROR_TAPISideType = -12008
+TAPIERROR_INPUTERROR_TAPIPositionEffectType = -12009
+TAPIERROR_INPUTERROR_TAPIHedgeFlagType = -12010
+TAPIERROR_INPUTERROR_TAPIOrderStateType = -12011
+TAPIERROR_INPUTERROR_TAPICalculateModeType = -12012
+TAPIERROR_INPUTERROR_TAPIMatchSourceType = -12013
+TAPIERROR_INPUTERROR_TAPIOpenCloseModeType = -12014
+TAPIERROR_INPUTERROR_TAPIFutureAlgType = -12015
+TAPIERROR_INPUTERROR_TAPIOptionAlgType = -12016
+TAPIERROR_INPUTERROR_TAPIBankAccountLWFlagType = -12017
+TAPIERROR_INPUTERROR_TAPIBankAccountStateType = -12018
+TAPIERROR_INPUTERROR_TAPIBankAccountSwapStateType = -12019
+TAPIERROR_INPUTERROR_TAPIBankAccountTransferStateType = -12020
+TAPIERROR_INPUTERROR_TAPIMarginCalculateModeType = -12021
+TAPIERROR_INPUTERROR_TAPIOptionMarginCalculateModeType = -12022
+TAPIERROR_INPUTERROR_TAPICmbDirectType = -12023
+TAPIERROR_INPUTERROR_TAPIDeliveryModeType = -12024
+TAPIERROR_INPUTERROR_TAPIContractTypeType = -12025
+TAPIERROR_INPUTERROR_TAPIPartyTypeType = -12026
+TAPIERROR_INPUTERROR_TAPIPartyCertificateTypeType = -12027
+TAPIERROR_INPUTERROR_TAPIMsgReceiverType = -12028
+TAPIERROR_INPUTERROR_TAPIMsgTypeType = -12029
+TAPIERROR_INPUTERROR_TAPIMsgLevelType = -12030
+TAPIERROR_INPUTERROR_TAPITransferDirectType = -12031
+TAPIERROR_INPUTERROR_TAPITransferStateType = -12032
+TAPIERROR_INPUTERROR_TAPITransferTypeType = -12033
+TAPIERROR_INPUTERROR_TAPITransferDeviceIDType = -12034
+TAPIERROR_INPUTERROR_TAPITacticsTypeType = -12035
+TAPIERROR_INPUTERROR_TAPIORDERACT = -12036
+TAPIERROR_INPUTERROR_TAPIBillTypeType = -12037
+TAPIERROR_INPUTERROR_TAPIBillFileTypeType = -12038
+TAPIERROR_INPUTERROR_TAPIOFFFlagType = -12039
+TAPIERROR_INPUTERROR_TAPICashAdjustTypeType = -12040
+TAPIERROR_INPUTERROR_TAPITriggerConditionType = -12041
+TAPIERROR_INPUTERROR_TAPITriggerPriceTypeType = -12042
+TAPIERROR_INPUTERROR_TAPITradingStateType = -12043
+TAPIERROR_INPUTERROR_TAPIMarketLevelType = -12044
+TAPIERROR_INPUTERROR_TAPIOrderQryTypeType = -12045
+TAPIERROR_INPUTERROR_TAPIClientID = -12046
+TAPIERROR_INPUTERROR_QryHisQuoteParam = -13001
+TAPIERROR_INPUTERROR_TAPIIncludeNAN = -13002
+TAPIERROR_INPUTERROR_TAPIPasswordType = -12048
+TAPIERROR_DISCONNECT_CLOSE_INIT = 1
+TAPIERROR_DISCONNECT_CLOSE_PASS = 2
+TAPIERROR_DISCONNECT_READ_ERROR = 3
+TAPIERROR_DISCONNECT_WRITE_ERROR = 4
+TAPIERROR_DISCONNECT_BUF_FULL = 5
+TAPIERROR_DISCONNECT_IOCP_ERROR = 6
+TAPIERROR_DISCONNECT_PARSE_ERROR = 7
+TAPIERROR_DISCONNECT_CONNECT_TIMEOUT = 8
+TAPIERROR_DISCONNECT_INIT_ERROR = 9
+TAPIERROR_DISCONNECT_HAS_CONNECTED = 10
+TAPIERROR_DISCONNECT_HAS_EXIT = 11
+TAPIERROR_DISCONNECT_TRY_LATER = 12
diff --git a/vnpy/api/tap/generator/tap_td_header_define.h b/vnpy/api/tap/generator/tap_td_header_define.h
new file mode 100644
index 0000000000..f77c022ff5
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_header_define.h
@@ -0,0 +1,50 @@
+#define ONCONNECT 0
+#define ONRSPLOGIN 1
+#define ONRTNCONTACTINFO 2
+#define ONRSPREQUESTVERTIFICATECODE 3
+#define ONEXPRIATIONDATE 4
+#define ONAPIREADY 5
+#define ONDISCONNECT 6
+#define ONRSPCHANGEPASSWORD 7
+#define ONRSPAUTHPASSWORD 8
+#define ONRSPQRYTRADINGDATE 9
+#define ONRSPSETRESERVEDINFO 10
+#define ONRSPQRYACCOUNT 11
+#define ONRSPQRYFUND 12
+#define ONRTNFUND 13
+#define ONRSPQRYEXCHANGE 14
+#define ONRSPQRYCOMMODITY 15
+#define ONRSPQRYCONTRACT 16
+#define ONRTNCONTRACT 17
+#define ONRSPORDERACTION 18
+#define ONRTNORDER 19
+#define ONRSPQRYORDER 20
+#define ONRSPQRYORDERPROCESS 21
+#define ONRSPQRYFILL 22
+#define ONRTNFILL 23
+#define ONRSPQRYPOSITION 24
+#define ONRTNPOSITION 25
+#define ONRSPQRYPOSITIONSUMMARY 26
+#define ONRTNPOSITIONSUMMARY 27
+#define ONRTNPOSITIONPROFIT 28
+#define ONRSPQRYCURRENCY 29
+#define ONRSPQRYTRADEMESSAGE 30
+#define ONRTNTRADEMESSAGE 31
+#define ONRSPQRYHISORDER 32
+#define ONRSPQRYHISORDERPROCESS 33
+#define ONRSPQRYHISMATCH 34
+#define ONRSPQRYHISPOSITION 35
+#define ONRSPQRYHISDELIVERY 36
+#define ONRSPQRYACCOUNTCASHADJUST 37
+#define ONRSPQRYBILL 38
+#define ONRSPQRYACCOUNTFEERENT 39
+#define ONRSPQRYACCOUNTMARGINRENT 40
+#define ONRSPHKMARKETORDERINSERT 41
+#define ONRSPHKMARKETORDERDELETE 42
+#define ONHKMARKETQUOTENOTICE 43
+#define ONRSPORDERLOCALREMOVE 44
+#define ONRSPORDERLOCALINPUT 45
+#define ONRSPORDERLOCALMODIFY 46
+#define ONRSPORDERLOCALTRANSFER 47
+#define ONRSPFILLLOCALINPUT 48
+#define ONRSPFILLLOCALREMOVE 49
diff --git a/vnpy/api/tap/generator/tap_td_header_function.h b/vnpy/api/tap/generator/tap_td_header_function.h
new file mode 100644
index 0000000000..1b495a1de6
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_header_function.h
@@ -0,0 +1,44 @@
+int qryTradingDate(unsigned int session);
+
+int qryAccount(unsigned int session, const dict &data);
+
+int qryFund(unsigned int session, const dict &data);
+
+int qryExchange(unsigned int session);
+
+int qryCommodity(unsigned int session);
+
+int qryContract(unsigned int session, const dict &data);
+
+int qryOrder(unsigned int session, const dict &data);
+
+int qryOrderProcess(unsigned int session, const dict &data);
+
+int qryFill(unsigned int session, const dict &data);
+
+int qryPosition(unsigned int session, const dict &data);
+
+int qryPositionSummary(unsigned int session, const dict &data);
+
+int qryCurrency(unsigned int session);
+
+int qryAccountCashAdjust(unsigned int session, const dict &data);
+
+int qryTradeMessage(unsigned int session, const dict &data);
+
+int qryBill(unsigned int session, const dict &data);
+
+int qryHisOrder(unsigned int session, const dict &data);
+
+int qryHisOrderProcess(unsigned int session, const dict &data);
+
+int qryHisMatch(unsigned int session, const dict &data);
+
+int qryHisPosition(unsigned int session, const dict &data);
+
+int qryHisDelivery(unsigned int session, const dict &data);
+
+int qryAccountFeeRent(unsigned int session, const dict &data);
+
+int qryAccountMarginRent(unsigned int session, const dict &data);
+
diff --git a/vnpy/api/tap/generator/tap_td_header_on.h b/vnpy/api/tap/generator/tap_td_header_on.h
new file mode 100644
index 0000000000..9ae0623879
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_header_on.h
@@ -0,0 +1,100 @@
+virtual void onConnect() {};
+
+virtual void onRspLogin(int error, const dict &data) {};
+
+virtual void onRtnContactInfo(int error, char last, string ContactInfo) {};
+
+virtual void onRspRequestVertificateCode(unsigned int session, int error, const dict &data) {};
+
+virtual void onExpriationDate(string date, int days) {};
+
+virtual void onAPIReady(int error) {};
+
+virtual void onDisconnect(int reason) {};
+
+virtual void onRspChangePassword(unsigned int session, int error) {};
+
+virtual void onRspAuthPassword(unsigned int session, int error) {};
+
+virtual void onRspQryTradingDate(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspSetReservedInfo(unsigned int session, int error, string info) {};
+
+virtual void onRspQryAccount(unsigned int session, unsigned int session, char last, const dict &data) {};
+
+virtual void onRspQryFund(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnFund(const dict &data) {};
+
+virtual void onRspQryExchange(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryContract(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnContract(const dict &data) {};
+
+virtual void onRspOrderAction(unsigned int session, int error, const dict &data) {};
+
+virtual void onRtnOrder(const dict &data) {};
+
+virtual void onRspQryOrder(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryOrderProcess(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryFill(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnFill(const dict &data) {};
+
+virtual void onRspQryPosition(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnPosition(const dict &data) {};
+
+virtual void onRspQryPositionSummary(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnPositionSummary(const dict &data) {};
+
+virtual void onRtnPositionProfit(const dict &data) {};
+
+virtual void onRspQryCurrency(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryTradeMessage(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRtnTradeMessage(const dict &data) {};
+
+virtual void onRspQryHisOrder(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryHisOrderProcess(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryHisMatch(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryHisPosition(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryHisDelivery(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryAccountCashAdjust(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryBill(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryAccountFeeRent(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspQryAccountMarginRent(unsigned int session, int error, char last, const dict &data) {};
+
+virtual void onRspHKMarketOrderInsert(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspHKMarketOrderDelete(unsigned int session, int error, const dict &data) {};
+
+virtual void onHKMarketQuoteNotice(const dict &data) {};
+
+virtual void onRspOrderLocalRemove(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspOrderLocalInput(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspOrderLocalModify(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspOrderLocalTransfer(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspFillLocalInput(unsigned int session, int error, const dict &data) {};
+
+virtual void onRspFillLocalRemove(unsigned int session, int error, const dict &data) {};
+
diff --git a/vnpy/api/tap/generator/tap_td_header_process.h b/vnpy/api/tap/generator/tap_td_header_process.h
new file mode 100644
index 0000000000..9203b0af61
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_header_process.h
@@ -0,0 +1,100 @@
+void processConnect(Task *task);
+
+void processRspLogin(Task *task);
+
+void processRtnContactInfo(Task *task);
+
+void processRspRequestVertificateCode(Task *task);
+
+void processExpriationDate(Task *task);
+
+void processAPIReady(Task *task);
+
+void processDisconnect(Task *task);
+
+void processRspChangePassword(Task *task);
+
+void processRspAuthPassword(Task *task);
+
+void processRspQryTradingDate(Task *task);
+
+void processRspSetReservedInfo(Task *task);
+
+void processRspQryAccount(Task *task);
+
+void processRspQryFund(Task *task);
+
+void processRtnFund(Task *task);
+
+void processRspQryExchange(Task *task);
+
+void processRspQryCommodity(Task *task);
+
+void processRspQryContract(Task *task);
+
+void processRtnContract(Task *task);
+
+void processRspOrderAction(Task *task);
+
+void processRtnOrder(Task *task);
+
+void processRspQryOrder(Task *task);
+
+void processRspQryOrderProcess(Task *task);
+
+void processRspQryFill(Task *task);
+
+void processRtnFill(Task *task);
+
+void processRspQryPosition(Task *task);
+
+void processRtnPosition(Task *task);
+
+void processRspQryPositionSummary(Task *task);
+
+void processRtnPositionSummary(Task *task);
+
+void processRtnPositionProfit(Task *task);
+
+void processRspQryCurrency(Task *task);
+
+void processRspQryTradeMessage(Task *task);
+
+void processRtnTradeMessage(Task *task);
+
+void processRspQryHisOrder(Task *task);
+
+void processRspQryHisOrderProcess(Task *task);
+
+void processRspQryHisMatch(Task *task);
+
+void processRspQryHisPosition(Task *task);
+
+void processRspQryHisDelivery(Task *task);
+
+void processRspQryAccountCashAdjust(Task *task);
+
+void processRspQryBill(Task *task);
+
+void processRspQryAccountFeeRent(Task *task);
+
+void processRspQryAccountMarginRent(Task *task);
+
+void processRspHKMarketOrderInsert(Task *task);
+
+void processRspHKMarketOrderDelete(Task *task);
+
+void processHKMarketQuoteNotice(Task *task);
+
+void processRspOrderLocalRemove(Task *task);
+
+void processRspOrderLocalInput(Task *task);
+
+void processRspOrderLocalModify(Task *task);
+
+void processRspOrderLocalTransfer(Task *task);
+
+void processRspFillLocalInput(Task *task);
+
+void processRspFillLocalRemove(Task *task);
+
diff --git a/vnpy/api/tap/generator/tap_td_source_function.cpp b/vnpy/api/tap/generator/tap_td_source_function.cpp
new file mode 100644
index 0000000000..b3c8eb73f5
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_function.cpp
@@ -0,0 +1,245 @@
+int TdApi::qryTradingDate(unsigned int session)
+{
+ int i = this->api->QryTradingDate(session);
+ return i;
+};
+
+int TdApi::qryAccount(unsigned int session, const dict &req)
+{
+ TapAPIAccQryReq myreq = TapAPIAccQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ int i = this->api->QryAccount(session, &myreq);
+ return i;
+};
+
+int TdApi::qryFund(unsigned int session, const dict &req)
+{
+ TapAPIFundReq myreq = TapAPIFundReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ int i = this->api->QryFund(session, &myreq);
+ return i;
+};
+
+int TdApi::qryExchange(unsigned int session)
+{
+ int i = this->api->QryExchange(session);
+ return i;
+};
+
+int TdApi::qryCommodity(unsigned int session)
+{
+ int i = this->api->QryCommodity(session);
+ return i;
+};
+
+int TdApi::qryContract(unsigned int session, const dict &req)
+{
+ TapAPICommodity myreq = TapAPICommodity();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "ExchangeNo", myreq.ExchangeNo);
+ getChar(req, "CommodityType", &myreq.CommodityType);
+ getString(req, "CommodityNo", myreq.CommodityNo);
+ int i = this->api->QryContract(session, &myreq);
+ return i;
+};
+
+int TdApi::qryOrder(unsigned int session, const dict &req)
+{
+ TapAPIOrderQryReq myreq = TapAPIOrderQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "ExchangeNo", myreq.ExchangeNo);
+ getChar(req, "CommodityType", &myreq.CommodityType);
+ getString(req, "CommodityNo", myreq.CommodityNo);
+ getChar(req, "OrderType", &myreq.OrderType);
+ getChar(req, "OrderSource", &myreq.OrderSource);
+ getChar(req, "TimeInForce", &myreq.TimeInForce);
+ getString(req, "ExpireTime", myreq.ExpireTime);
+ getChar(req, "IsRiskOrder", &myreq.IsRiskOrder);
+ getChar(req, "ServerFlag", &myreq.ServerFlag);
+ getString(req, "OrderNo", myreq.OrderNo);
+ getChar(req, "IsBackInput", &myreq.IsBackInput);
+ getChar(req, "IsDeleted", &myreq.IsDeleted);
+ getChar(req, "IsAddOne", &myreq.IsAddOne);
+ int i = this->api->QryOrder(session, &myreq);
+ return i;
+};
+
+int TdApi::qryOrderProcess(unsigned int session, const dict &req)
+{
+ TapAPIOrderProcessQryReq myreq = TapAPIOrderProcessQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getChar(req, "ServerFlag", &myreq.ServerFlag);
+ getString(req, "OrderNo", myreq.OrderNo);
+ int i = this->api->QryOrderProcess(session, &myreq);
+ return i;
+};
+
+int TdApi::qryFill(unsigned int session, const dict &req)
+{
+ TapAPIFillQryReq myreq = TapAPIFillQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "ExchangeNo", myreq.ExchangeNo);
+ getChar(req, "CommodityType", &myreq.CommodityType);
+ getString(req, "CommodityNo", myreq.CommodityNo);
+ getString(req, "ContractNo", myreq.ContractNo);
+ getString(req, "StrikePrice", myreq.StrikePrice);
+ getChar(req, "CallOrPutFlag", &myreq.CallOrPutFlag);
+ getChar(req, "MatchSource", &myreq.MatchSource);
+ getChar(req, "MatchSide", &myreq.MatchSide);
+ getChar(req, "PositionEffect", &myreq.PositionEffect);
+ getChar(req, "ServerFlag", &myreq.ServerFlag);
+ getString(req, "OrderNo", myreq.OrderNo);
+ getString(req, "UpperNo", myreq.UpperNo);
+ getChar(req, "IsDeleted", &myreq.IsDeleted);
+ getChar(req, "IsAddOne", &myreq.IsAddOne);
+ int i = this->api->QryFill(session, &myreq);
+ return i;
+};
+
+int TdApi::qryPosition(unsigned int session, const dict &req)
+{
+ TapAPIPositionQryReq myreq = TapAPIPositionQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ int i = this->api->QryPosition(session, &myreq);
+ return i;
+};
+
+int TdApi::qryPositionSummary(unsigned int session, const dict &req)
+{
+ TapAPIPositionQryReq myreq = TapAPIPositionQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ int i = this->api->QryPositionSummary(session, &myreq);
+ return i;
+};
+
+int TdApi::qryCurrency(unsigned int session)
+{
+ int i = this->api->QryCurrency(session);
+ return i;
+};
+
+int TdApi::qryAccountCashAdjust(unsigned int session, const dict &req)
+{
+ TapAPIAccountCashAdjustQryReq myreq = TapAPIAccountCashAdjustQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getUnsigned int(req, "SerialID", &myreq.SerialID);
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "AccountAttributeNo", myreq.AccountAttributeNo);
+ getString(req, "BeginDate", myreq.BeginDate);
+ getString(req, "EndDate", myreq.EndDate);
+ int i = this->api->QryAccountCashAdjust(session, &myreq);
+ return i;
+};
+
+int TdApi::qryTradeMessage(unsigned int session, const dict &req)
+{
+ TapAPITradeMessageReq myreq = TapAPITradeMessageReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "AccountAttributeNo", myreq.AccountAttributeNo);
+ getString(req, "BenginSendDateTime", myreq.BenginSendDateTime);
+ getString(req, "EndSendDateTime", myreq.EndSendDateTime);
+ int i = this->api->QryTradeMessage(session, &myreq);
+ return i;
+};
+
+int TdApi::qryBill(unsigned int session, const dict &req)
+{
+ TapAPIBillQryReq myreq = TapAPIBillQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "UserNo", myreq.UserNo);
+ getChar(req, "BillType", &myreq.BillType);
+ getString(req, "BillDate", myreq.BillDate);
+ getChar(req, "BillFileType", &myreq.BillFileType);
+ int i = this->api->QryBill(session, &myreq);
+ return i;
+};
+
+int TdApi::qryHisOrder(unsigned int session, const dict &req)
+{
+ TapAPIHisOrderQryReq myreq = TapAPIHisOrderQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "AccountAttributeNo", myreq.AccountAttributeNo);
+ getString(req, "BeginDate", myreq.BeginDate);
+ getString(req, "EndDate", myreq.EndDate);
+ int i = this->api->QryHisOrder(session, &myreq);
+ return i;
+};
+
+int TdApi::qryHisOrderProcess(unsigned int session, const dict &req)
+{
+ TapAPIHisOrderProcessQryReq myreq = TapAPIHisOrderProcessQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "Date", myreq.Date);
+ getString(req, "OrderNo", myreq.OrderNo);
+ int i = this->api->QryHisOrderProcess(session, &myreq);
+ return i;
+};
+
+int TdApi::qryHisMatch(unsigned int session, const dict &req)
+{
+ TapAPIHisMatchQryReq myreq = TapAPIHisMatchQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "AccountAttributeNo", myreq.AccountAttributeNo);
+ getString(req, "BeginDate", myreq.BeginDate);
+ getString(req, "EndDate", myreq.EndDate);
+ getChar(req, "CountType", &myreq.CountType);
+ int i = this->api->QryHisMatch(session, &myreq);
+ return i;
+};
+
+int TdApi::qryHisPosition(unsigned int session, const dict &req)
+{
+ TapAPIHisPositionQryReq myreq = TapAPIHisPositionQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getDict(req, "AccountAttributeNo", &myreq.AccountAttributeNo);
+ getString(req, "Date", myreq.Date);
+ getDict(req, "CountType", &myreq.CountType);
+ getChar(req, "SettleFlag", &myreq.SettleFlag);
+ int i = this->api->QryHisPosition(session, &myreq);
+ return i;
+};
+
+int TdApi::qryHisDelivery(unsigned int session, const dict &req)
+{
+ TapAPIHisDeliveryQryReq myreq = TapAPIHisDeliveryQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "AccountAttributeNo", myreq.AccountAttributeNo);
+ getString(req, "BeginDate", myreq.BeginDate);
+ getString(req, "EndDate", myreq.EndDate);
+ getChar(req, "CountType", &myreq.CountType);
+ int i = this->api->QryHisDelivery(session, &myreq);
+ return i;
+};
+
+int TdApi::qryAccountFeeRent(unsigned int session, const dict &req)
+{
+ TapAPIAccountFeeRentQryReq myreq = TapAPIAccountFeeRentQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ int i = this->api->QryAccountFeeRent(session, &myreq);
+ return i;
+};
+
+int TdApi::qryAccountMarginRent(unsigned int session, const dict &req)
+{
+ TapAPIAccountMarginRentQryReq myreq = TapAPIAccountMarginRentQryReq();
+ memset(&myreq, 0, sizeof(myreq));
+ getString(req, "AccountNo", myreq.AccountNo);
+ getString(req, "ExchangeNo", myreq.ExchangeNo);
+ getChar(req, "CommodityType", &myreq.CommodityType);
+ getString(req, "CommodityNo", myreq.CommodityNo);
+ getString(req, "ContractNo", myreq.ContractNo);
+ int i = this->api->QryAccountMarginRent(session, &myreq);
+ return i;
+};
+
diff --git a/vnpy/api/tap/generator/tap_td_source_module.cpp b/vnpy/api/tap/generator/tap_td_source_module.cpp
new file mode 100644
index 0000000000..692ddead35
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_module.cpp
@@ -0,0 +1,74 @@
+.def("qryTradingDate", &TdApi::qryTradingDate)
+.def("qryAccount", &TdApi::qryAccount)
+.def("qryFund", &TdApi::qryFund)
+.def("qryExchange", &TdApi::qryExchange)
+.def("qryCommodity", &TdApi::qryCommodity)
+.def("qryContract", &TdApi::qryContract)
+.def("qryOrder", &TdApi::qryOrder)
+.def("qryOrderProcess", &TdApi::qryOrderProcess)
+.def("qryFill", &TdApi::qryFill)
+.def("qryPosition", &TdApi::qryPosition)
+.def("qryPositionSummary", &TdApi::qryPositionSummary)
+.def("qryCurrency", &TdApi::qryCurrency)
+.def("qryAccountCashAdjust", &TdApi::qryAccountCashAdjust)
+.def("qryTradeMessage", &TdApi::qryTradeMessage)
+.def("qryBill", &TdApi::qryBill)
+.def("qryHisOrder", &TdApi::qryHisOrder)
+.def("qryHisOrderProcess", &TdApi::qryHisOrderProcess)
+.def("qryHisMatch", &TdApi::qryHisMatch)
+.def("qryHisPosition", &TdApi::qryHisPosition)
+.def("qryHisDelivery", &TdApi::qryHisDelivery)
+.def("qryAccountFeeRent", &TdApi::qryAccountFeeRent)
+.def("qryAccountMarginRent", &TdApi::qryAccountMarginRent)
+
+.def("onConnect", &TdApi::onConnect)
+.def("onRspLogin", &TdApi::onRspLogin)
+.def("onRtnContactInfo", &TdApi::onRtnContactInfo)
+.def("onRspRequestVertificateCode", &TdApi::onRspRequestVertificateCode)
+.def("onExpriationDate", &TdApi::onExpriationDate)
+.def("onAPIReady", &TdApi::onAPIReady)
+.def("onDisconnect", &TdApi::onDisconnect)
+.def("onRspChangePassword", &TdApi::onRspChangePassword)
+.def("onRspAuthPassword", &TdApi::onRspAuthPassword)
+.def("onRspQryTradingDate", &TdApi::onRspQryTradingDate)
+.def("onRspSetReservedInfo", &TdApi::onRspSetReservedInfo)
+.def("onRspQryAccount", &TdApi::onRspQryAccount)
+.def("onRspQryFund", &TdApi::onRspQryFund)
+.def("onRtnFund", &TdApi::onRtnFund)
+.def("onRspQryExchange", &TdApi::onRspQryExchange)
+.def("onRspQryCommodity", &TdApi::onRspQryCommodity)
+.def("onRspQryContract", &TdApi::onRspQryContract)
+.def("onRtnContract", &TdApi::onRtnContract)
+.def("onRspOrderAction", &TdApi::onRspOrderAction)
+.def("onRtnOrder", &TdApi::onRtnOrder)
+.def("onRspQryOrder", &TdApi::onRspQryOrder)
+.def("onRspQryOrderProcess", &TdApi::onRspQryOrderProcess)
+.def("onRspQryFill", &TdApi::onRspQryFill)
+.def("onRtnFill", &TdApi::onRtnFill)
+.def("onRspQryPosition", &TdApi::onRspQryPosition)
+.def("onRtnPosition", &TdApi::onRtnPosition)
+.def("onRspQryPositionSummary", &TdApi::onRspQryPositionSummary)
+.def("onRtnPositionSummary", &TdApi::onRtnPositionSummary)
+.def("onRtnPositionProfit", &TdApi::onRtnPositionProfit)
+.def("onRspQryCurrency", &TdApi::onRspQryCurrency)
+.def("onRspQryTradeMessage", &TdApi::onRspQryTradeMessage)
+.def("onRtnTradeMessage", &TdApi::onRtnTradeMessage)
+.def("onRspQryHisOrder", &TdApi::onRspQryHisOrder)
+.def("onRspQryHisOrderProcess", &TdApi::onRspQryHisOrderProcess)
+.def("onRspQryHisMatch", &TdApi::onRspQryHisMatch)
+.def("onRspQryHisPosition", &TdApi::onRspQryHisPosition)
+.def("onRspQryHisDelivery", &TdApi::onRspQryHisDelivery)
+.def("onRspQryAccountCashAdjust", &TdApi::onRspQryAccountCashAdjust)
+.def("onRspQryBill", &TdApi::onRspQryBill)
+.def("onRspQryAccountFeeRent", &TdApi::onRspQryAccountFeeRent)
+.def("onRspQryAccountMarginRent", &TdApi::onRspQryAccountMarginRent)
+.def("onRspHKMarketOrderInsert", &TdApi::onRspHKMarketOrderInsert)
+.def("onRspHKMarketOrderDelete", &TdApi::onRspHKMarketOrderDelete)
+.def("onHKMarketQuoteNotice", &TdApi::onHKMarketQuoteNotice)
+.def("onRspOrderLocalRemove", &TdApi::onRspOrderLocalRemove)
+.def("onRspOrderLocalInput", &TdApi::onRspOrderLocalInput)
+.def("onRspOrderLocalModify", &TdApi::onRspOrderLocalModify)
+.def("onRspOrderLocalTransfer", &TdApi::onRspOrderLocalTransfer)
+.def("onRspFillLocalInput", &TdApi::onRspFillLocalInput)
+.def("onRspFillLocalRemove", &TdApi::onRspFillLocalRemove)
+;
diff --git a/vnpy/api/tap/generator/tap_td_source_on.cpp b/vnpy/api/tap/generator/tap_td_source_on.cpp
new file mode 100644
index 0000000000..64f1f9aa8b
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_on.cpp
@@ -0,0 +1,600 @@
+void onConnect() override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onConnect);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspLogin(int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspLogin, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnContactInfo(int error, char last, string ContactInfo) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnContactInfo, error, last, ContactInfo);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspRequestVertificateCode(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspRequestVertificateCode, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onExpriationDate(string date, int days) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onExpriationDate, date, days);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onAPIReady(int error) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onAPIReady, error);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onDisconnect(int reasonCode) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onDisconnect, reasonCode);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspChangePassword(unsigned int session, int error) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspChangePassword, session, error);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspAuthPassword(unsigned int session, int error) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspAuthPassword, session, error);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryTradingDate(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryTradingDate, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspSetReservedInfo(unsigned int session, int error, string info) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspSetReservedInfo, session, error, info);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryAccount(unsigned int session, unsigned int session, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryAccount, session, session, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryFund(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryFund, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnFund(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnFund, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryExchange(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryExchange, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryCommodity(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryCommodity, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryContract(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryContract, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnContract(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnContract, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspOrderAction(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspOrderAction, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnOrder(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnOrder, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryOrder(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryOrder, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryOrderProcess(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryOrderProcess, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryFill(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryFill, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnFill(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnFill, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryPosition(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryPosition, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnPosition(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnPosition, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryPositionSummary(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryPositionSummary, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnPositionSummary(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnPositionSummary, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnPositionProfit(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnPositionProfit, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryCurrency(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryCurrency, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryTradeMessage(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryTradeMessage, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRtnTradeMessage(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRtnTradeMessage, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryHisOrder(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryHisOrder, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryHisOrderProcess(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryHisOrderProcess, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryHisMatch(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryHisMatch, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryHisPosition(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryHisPosition, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryHisDelivery(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryHisDelivery, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryAccountCashAdjust(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountCashAdjust, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryBill(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryBill, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryAccountFeeRent(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountFeeRent, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspQryAccountMarginRent(unsigned int session, int error, char last, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspQryAccountMarginRent, session, error, last, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspHKMarketOrderInsert(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspHKMarketOrderInsert, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspHKMarketOrderDelete(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspHKMarketOrderDelete, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onHKMarketQuoteNotice(const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onHKMarketQuoteNotice, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspOrderLocalRemove(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalRemove, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspOrderLocalInput(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalInput, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspOrderLocalModify(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalModify, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspOrderLocalTransfer(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspOrderLocalTransfer, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspFillLocalInput(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspFillLocalInput, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
+void onRspFillLocalRemove(unsigned int session, int error, const dict &data) override
+{
+ try
+ {
+ PYBIND11_OVERLOAD(void, TdApi, onRspFillLocalRemove, session, error, data);
+ }
+ catch (const error_already_set &e)
+ {
+ cout << e.what() << endl;
+ }
+};
+
diff --git a/vnpy/api/tap/generator/tap_td_source_process.cpp b/vnpy/api/tap/generator/tap_td_source_process.cpp
new file mode 100644
index 0000000000..dd83edcaf7
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_process.cpp
@@ -0,0 +1,1588 @@
+void TdApi::processConnect(Task *task)
+{
+ this->onConnect();
+};
+
+void TdApi::processRspLogin(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradeLoginRspInfo *task_data = (TapAPITradeLoginRspInfo*)task->task_data;
+ data["UserNo"] = toUtf(task_data->UserNo);
+ data["UserType"] = task_data->UserType;
+ data["UserName"] = toUtf(task_data->UserName);
+ data["ReservedInfo"] = toUtf(task_data->ReservedInfo);
+ data["LastLoginIP"] = toUtf(task_data->LastLoginIP);
+ data["LastLoginProt"] = task_data->LastLoginProt;
+ data["LastLoginTime"] = toUtf(task_data->LastLoginTime);
+ data["LastLogoutTime"] = toUtf(task_data->LastLogoutTime);
+ data["TradeDate"] = toUtf(task_data->TradeDate);
+ data["LastSettleTime"] = toUtf(task_data->LastSettleTime);
+ data["StartTime"] = toUtf(task_data->StartTime);
+ data["InitTime"] = toUtf(task_data->InitTime);
+ delete task_data;
+ }
+ this->onRspLogin(task->task_int, data);
+};
+
+void TdApi::processRtnContactInfo(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onRtnContactInfo(task->task_int, task->task_last, task->task_string);
+};
+
+void TdApi::processRspRequestVertificateCode(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIRequestVertificateCodeRsp *task_data = (TapAPIRequestVertificateCodeRsp*)task->task_data;
+ data["SecondSerialID"] = toUtf(task_data->SecondSerialID);
+ data["Effective"] = task_data->Effective;
+ delete task_data;
+ }
+ this->onRspRequestVertificateCode(task->task_id, task->task_int, data);
+};
+
+void TdApi::processExpriationDate(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onExpriationDate(task->task_string, task->task_int);
+};
+
+void TdApi::processAPIReady(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onAPIReady(task->task_int);
+};
+
+void TdApi::processDisconnect(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onDisconnect(task->task_int);
+};
+
+void TdApi::processRspChangePassword(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onRspChangePassword(task->task_id, task->task_int);
+};
+
+void TdApi::processRspAuthPassword(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onRspAuthPassword(task->task_id, task->task_int);
+};
+
+void TdApi::processRspQryTradingDate(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradingCalendarQryRsp *task_data = (TapAPITradingCalendarQryRsp*)task->task_data;
+ data["CurrTradeDate"] = toUtf(task_data->CurrTradeDate);
+ data["LastSettlementDate"] = toUtf(task_data->LastSettlementDate);
+ data["PromptDate"] = toUtf(task_data->PromptDate);
+ data["LastPromptDate"] = toUtf(task_data->LastPromptDate);
+ delete task_data;
+ }
+ this->onRspQryTradingDate(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspSetReservedInfo(Task *task)
+{
+ gil_scoped_acquire acquire;
+ this->onRspSetReservedInfo(task->task_id, task->task_int, task->task_string);
+};
+
+void TdApi::processRspQryAccount(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIAccountInfo *task_data = (TapAPIAccountInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["AccountType"] = task_data->AccountType;
+ data["AccountState"] = task_data->AccountState;
+ data["AccountTradeRight"] = task_data->AccountTradeRight;
+ data["CommodityGroupNo"] = toUtf(task_data->CommodityGroupNo);
+ data["AccountShortName"] = toUtf(task_data->AccountShortName);
+ data["AccountEnShortName"] = toUtf(task_data->AccountEnShortName);
+ delete task_data;
+ }
+ this->onRspQryAccount(task->task_id, task->task_id, task->task_last, data);
+};
+
+void TdApi::processRspQryFund(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFundData *task_data = (TapAPIFundData*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["TradeRate"] = task_data->TradeRate;
+ data["FutureAlg"] = task_data->FutureAlg;
+ data["OptionAlg"] = task_data->OptionAlg;
+ data["PreBalance"] = task_data->PreBalance;
+ data["PreUnExpProfit"] = task_data->PreUnExpProfit;
+ data["PreLMEPositionProfit"] = task_data->PreLMEPositionProfit;
+ data["PreEquity"] = task_data->PreEquity;
+ data["PreAvailable1"] = task_data->PreAvailable1;
+ data["PreMarketEquity"] = task_data->PreMarketEquity;
+ data["CashInValue"] = task_data->CashInValue;
+ data["CashOutValue"] = task_data->CashOutValue;
+ data["CashAdjustValue"] = task_data->CashAdjustValue;
+ data["CashPledged"] = task_data->CashPledged;
+ data["FrozenFee"] = task_data->FrozenFee;
+ data["FrozenDeposit"] = task_data->FrozenDeposit;
+ data["AccountFee"] = task_data->AccountFee;
+ data["SwapInValue"] = task_data->SwapInValue;
+ data["SwapOutValue"] = task_data->SwapOutValue;
+ data["PremiumIncome"] = task_data->PremiumIncome;
+ data["PremiumPay"] = task_data->PremiumPay;
+ data["CloseProfit"] = task_data->CloseProfit;
+ data["FrozenFund"] = task_data->FrozenFund;
+ data["UnExpProfit"] = task_data->UnExpProfit;
+ data["ExpProfit"] = task_data->ExpProfit;
+ data["PositionProfit"] = task_data->PositionProfit;
+ data["LmePositionProfit"] = task_data->LmePositionProfit;
+ data["OptionMarketValue"] = task_data->OptionMarketValue;
+ data["AccountIntialMargin"] = task_data->AccountIntialMargin;
+ data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin;
+ data["UpperInitalMargin"] = task_data->UpperInitalMargin;
+ data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin;
+ data["Discount"] = task_data->Discount;
+ data["Balance"] = task_data->Balance;
+ data["Equity"] = task_data->Equity;
+ data["Available"] = task_data->Available;
+ data["CanDraw"] = task_data->CanDraw;
+ data["MarketEquity"] = task_data->MarketEquity;
+ data["AuthMoney"] = task_data->AuthMoney;
+ delete task_data;
+ }
+ this->onRspQryFund(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnFund(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFundData *task_data = (TapAPIFundData*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["TradeRate"] = task_data->TradeRate;
+ data["FutureAlg"] = task_data->FutureAlg;
+ data["OptionAlg"] = task_data->OptionAlg;
+ data["PreBalance"] = task_data->PreBalance;
+ data["PreUnExpProfit"] = task_data->PreUnExpProfit;
+ data["PreLMEPositionProfit"] = task_data->PreLMEPositionProfit;
+ data["PreEquity"] = task_data->PreEquity;
+ data["PreAvailable1"] = task_data->PreAvailable1;
+ data["PreMarketEquity"] = task_data->PreMarketEquity;
+ data["CashInValue"] = task_data->CashInValue;
+ data["CashOutValue"] = task_data->CashOutValue;
+ data["CashAdjustValue"] = task_data->CashAdjustValue;
+ data["CashPledged"] = task_data->CashPledged;
+ data["FrozenFee"] = task_data->FrozenFee;
+ data["FrozenDeposit"] = task_data->FrozenDeposit;
+ data["AccountFee"] = task_data->AccountFee;
+ data["SwapInValue"] = task_data->SwapInValue;
+ data["SwapOutValue"] = task_data->SwapOutValue;
+ data["PremiumIncome"] = task_data->PremiumIncome;
+ data["PremiumPay"] = task_data->PremiumPay;
+ data["CloseProfit"] = task_data->CloseProfit;
+ data["FrozenFund"] = task_data->FrozenFund;
+ data["UnExpProfit"] = task_data->UnExpProfit;
+ data["ExpProfit"] = task_data->ExpProfit;
+ data["PositionProfit"] = task_data->PositionProfit;
+ data["LmePositionProfit"] = task_data->LmePositionProfit;
+ data["OptionMarketValue"] = task_data->OptionMarketValue;
+ data["AccountIntialMargin"] = task_data->AccountIntialMargin;
+ data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin;
+ data["UpperInitalMargin"] = task_data->UpperInitalMargin;
+ data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin;
+ data["Discount"] = task_data->Discount;
+ data["Balance"] = task_data->Balance;
+ data["Equity"] = task_data->Equity;
+ data["Available"] = task_data->Available;
+ data["CanDraw"] = task_data->CanDraw;
+ data["MarketEquity"] = task_data->MarketEquity;
+ data["AuthMoney"] = task_data->AuthMoney;
+ delete task_data;
+ }
+ this->onRtnFund(data);
+};
+
+void TdApi::processRspQryExchange(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIExchangeInfo *task_data = (TapAPIExchangeInfo*)task->task_data;
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["ExchangeName"] = toUtf(task_data->ExchangeName);
+ delete task_data;
+ }
+ this->onRspQryExchange(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryCommodity(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPICommodityInfo *task_data = (TapAPICommodityInfo*)task->task_data;
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["CommodityName"] = toUtf(task_data->CommodityName);
+ data["CommodityEngName"] = toUtf(task_data->CommodityEngName);
+ data["RelateExchangeNo"] = toUtf(task_data->RelateExchangeNo);
+ data["RelateCommodityType"] = task_data->RelateCommodityType;
+ data["RelateCommodityNo"] = toUtf(task_data->RelateCommodityNo);
+ data["RelateExchangeNo2"] = toUtf(task_data->RelateExchangeNo2);
+ data["RelateCommodityType2"] = task_data->RelateCommodityType2;
+ data["RelateCommodityNo2"] = toUtf(task_data->RelateCommodityNo2);
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["TradeCurrency"] = toUtf(task_data->TradeCurrency);
+ data["ContractSize"] = task_data->ContractSize;
+ data["OpenCloseMode"] = task_data->OpenCloseMode;
+ data["StrikePriceTimes"] = task_data->StrikePriceTimes;
+ data["CommodityTickSize"] = task_data->CommodityTickSize;
+ data["CommodityDenominator"] = task_data->CommodityDenominator;
+ data["CmbDirect"] = task_data->CmbDirect;
+ data["DeliveryMode"] = task_data->DeliveryMode;
+ data["DeliveryDays"] = task_data->DeliveryDays;
+ data["AddOneTime"] = toUtf(task_data->AddOneTime);
+ data["CommodityTimeZone"] = task_data->CommodityTimeZone;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspQryCommodity(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryContract(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradeContractInfo *task_data = (TapAPITradeContractInfo*)task->task_data;
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo1"] = toUtf(task_data->ContractNo1);
+ data["StrikePrice1"] = toUtf(task_data->StrikePrice1);
+ data["CallOrPutFlag1"] = task_data->CallOrPutFlag1;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["ContractType"] = task_data->ContractType;
+ data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract);
+ data["ContractName"] = toUtf(task_data->ContractName);
+ data["ContractExpDate"] = toUtf(task_data->ContractExpDate);
+ data["LastTradeDate"] = toUtf(task_data->LastTradeDate);
+ data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate);
+ delete task_data;
+ }
+ this->onRspQryContract(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnContract(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradeContractInfo *task_data = (TapAPITradeContractInfo*)task->task_data;
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo1"] = toUtf(task_data->ContractNo1);
+ data["StrikePrice1"] = toUtf(task_data->StrikePrice1);
+ data["CallOrPutFlag1"] = task_data->CallOrPutFlag1;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["ContractType"] = task_data->ContractType;
+ data["QuoteUnderlyingContract"] = toUtf(task_data->QuoteUnderlyingContract);
+ data["ContractName"] = toUtf(task_data->ContractName);
+ data["ContractExpDate"] = toUtf(task_data->ContractExpDate);
+ data["LastTradeDate"] = toUtf(task_data->LastTradeDate);
+ data["FirstNoticeDate"] = toUtf(task_data->FirstNoticeDate);
+ delete task_data;
+ }
+ this->onRtnContract(data);
+};
+
+void TdApi::processRspOrderAction(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderActionRsp *task_data = (TapAPIOrderActionRsp*)task->task_data;
+ data["ActionType"] = task_data->ActionType;
+ data["OrderInfo"] = task_data->OrderInfo;
+ delete task_data;
+ }
+ this->onRspOrderAction(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRtnOrder(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderInfoNotice *task_data = (TapAPIOrderInfoNotice*)task->task_data;
+ data["SessionID"] = task_data->SessionID;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["OrderInfo"] = task_data->OrderInfo;
+ delete task_data;
+ }
+ this->onRtnOrder(data);
+};
+
+void TdApi::processRspQryOrder(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderInfo *task_data = (TapAPIOrderInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo);
+ data["ClientID"] = toUtf(task_data->ClientID);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspQryOrder(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryOrderProcess(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderInfo *task_data = (TapAPIOrderInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo);
+ data["ClientID"] = toUtf(task_data->ClientID);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspQryOrderProcess(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryFill(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFillInfo *task_data = (TapAPIFillInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSource"] = task_data->MatchSource;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo);
+ data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo);
+ data["MatchDateTime"] = toUtf(task_data->MatchDateTime);
+ data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["MatchPrice"] = task_data->MatchPrice;
+ data["MatchQty"] = task_data->MatchQty;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup);
+ data["FeeCurrency"] = toUtf(task_data->FeeCurrency);
+ data["FeeValue"] = task_data->FeeValue;
+ data["IsManualFee"] = task_data->IsManualFee;
+ data["ClosePrositionPrice"] = task_data->ClosePrositionPrice;
+ delete task_data;
+ }
+ this->onRspQryFill(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnFill(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFillInfo *task_data = (TapAPIFillInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSource"] = task_data->MatchSource;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo);
+ data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo);
+ data["MatchDateTime"] = toUtf(task_data->MatchDateTime);
+ data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["MatchPrice"] = task_data->MatchPrice;
+ data["MatchQty"] = task_data->MatchQty;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup);
+ data["FeeCurrency"] = toUtf(task_data->FeeCurrency);
+ data["FeeValue"] = task_data->FeeValue;
+ data["IsManualFee"] = task_data->IsManualFee;
+ data["ClosePrositionPrice"] = task_data->ClosePrositionPrice;
+ delete task_data;
+ }
+ this->onRtnFill(data);
+};
+
+void TdApi::processRspQryPosition(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIPositionInfo *task_data = (TapAPIPositionInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["PositionNo"] = toUtf(task_data->PositionNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["PositionPrice"] = task_data->PositionPrice;
+ data["PositionQty"] = task_data->PositionQty;
+ data["PositionStreamId"] = task_data->PositionStreamId;
+ data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup);
+ data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency);
+ data["CalculatePrice"] = task_data->CalculatePrice;
+ data["AccountInitialMargin"] = task_data->AccountInitialMargin;
+ data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin;
+ data["UpperInitialMargin"] = task_data->UpperInitialMargin;
+ data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin;
+ data["PositionProfit"] = task_data->PositionProfit;
+ data["LMEPositionProfit"] = task_data->LMEPositionProfit;
+ data["OptionMarketValue"] = task_data->OptionMarketValue;
+ data["IsHistory"] = task_data->IsHistory;
+ delete task_data;
+ }
+ this->onRspQryPosition(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnPosition(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIPositionInfo *task_data = (TapAPIPositionInfo*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["PositionNo"] = toUtf(task_data->PositionNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["PositionPrice"] = task_data->PositionPrice;
+ data["PositionQty"] = task_data->PositionQty;
+ data["PositionStreamId"] = task_data->PositionStreamId;
+ data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup);
+ data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency);
+ data["CalculatePrice"] = task_data->CalculatePrice;
+ data["AccountInitialMargin"] = task_data->AccountInitialMargin;
+ data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin;
+ data["UpperInitialMargin"] = task_data->UpperInitialMargin;
+ data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin;
+ data["PositionProfit"] = task_data->PositionProfit;
+ data["LMEPositionProfit"] = task_data->LMEPositionProfit;
+ data["OptionMarketValue"] = task_data->OptionMarketValue;
+ data["IsHistory"] = task_data->IsHistory;
+ delete task_data;
+ }
+ this->onRtnPosition(data);
+};
+
+void TdApi::processRspQryPositionSummary(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIPositionSummary *task_data = (TapAPIPositionSummary*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionPrice"] = task_data->PositionPrice;
+ data["PositionQty"] = task_data->PositionQty;
+ data["HisPositionQty"] = task_data->HisPositionQty;
+ delete task_data;
+ }
+ this->onRspQryPositionSummary(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnPositionSummary(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIPositionSummary *task_data = (TapAPIPositionSummary*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionPrice"] = task_data->PositionPrice;
+ data["PositionQty"] = task_data->PositionQty;
+ data["HisPositionQty"] = task_data->HisPositionQty;
+ delete task_data;
+ }
+ this->onRtnPositionSummary(data);
+};
+
+void TdApi::processRtnPositionProfit(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIPositionProfitNotice *task_data = (TapAPIPositionProfitNotice*)task->task_data;
+ data["IsLast"] = task_data->IsLast;
+ data["Data"] = task_data->Data;
+ delete task_data;
+ }
+ this->onRtnPositionProfit(data);
+};
+
+void TdApi::processRspQryCurrency(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPICurrencyInfo *task_data = (TapAPICurrencyInfo*)task->task_data;
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["TradeRate"] = task_data->TradeRate;
+ data["TradeRate2"] = task_data->TradeRate2;
+ data["FutureAlg"] = task_data->FutureAlg;
+ data["OptionAlg"] = task_data->OptionAlg;
+ delete task_data;
+ }
+ this->onRspQryCurrency(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryTradeMessage(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradeMessage *task_data = (TapAPITradeMessage*)task->task_data;
+ data["SerialID"] = task_data->SerialID;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["TMsgValidDateTime"] = toUtf(task_data->TMsgValidDateTime);
+ data["TMsgTitle"] = toUtf(task_data->TMsgTitle);
+ data["TMsgContent"] = toUtf(task_data->TMsgContent);
+ data["TMsgType"] = task_data->TMsgType;
+ data["TMsgLevel"] = task_data->TMsgLevel;
+ data["IsSendBySMS"] = task_data->IsSendBySMS;
+ data["IsSendByEMail"] = task_data->IsSendByEMail;
+ data["Sender"] = toUtf(task_data->Sender);
+ data["SendDateTime"] = toUtf(task_data->SendDateTime);
+ delete task_data;
+ }
+ this->onRspQryTradeMessage(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRtnTradeMessage(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPITradeMessage *task_data = (TapAPITradeMessage*)task->task_data;
+ data["SerialID"] = task_data->SerialID;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["TMsgValidDateTime"] = toUtf(task_data->TMsgValidDateTime);
+ data["TMsgTitle"] = toUtf(task_data->TMsgTitle);
+ data["TMsgContent"] = toUtf(task_data->TMsgContent);
+ data["TMsgType"] = task_data->TMsgType;
+ data["TMsgLevel"] = task_data->TMsgLevel;
+ data["IsSendBySMS"] = task_data->IsSendBySMS;
+ data["IsSendByEMail"] = task_data->IsSendByEMail;
+ data["Sender"] = toUtf(task_data->Sender);
+ data["SendDateTime"] = toUtf(task_data->SendDateTime);
+ delete task_data;
+ }
+ this->onRtnTradeMessage(data);
+};
+
+void TdApi::processRspQryHisOrder(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIHisOrderQryRsp *task_data = (TapAPIHisOrderQryRsp*)task->task_data;
+ data["Date"] = toUtf(task_data->Date);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["OrderCanceledQty"] = task_data->OrderCanceledQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ delete task_data;
+ }
+ this->onRspQryHisOrder(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryHisOrderProcess(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIHisOrderProcessQryRsp *task_data = (TapAPIHisOrderProcessQryRsp*)task->task_data;
+ data["Date"] = toUtf(task_data->Date);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["OrderCanceledQty"] = task_data->OrderCanceledQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ delete task_data;
+ }
+ this->onRspQryHisOrderProcess(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryHisMatch(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIHisMatchQryRsp *task_data = (TapAPIHisMatchQryRsp*)task->task_data;
+ data["SettleDate"] = toUtf(task_data->SettleDate);
+ data["TradeDate"] = toUtf(task_data->TradeDate);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSource"] = task_data->MatchSource;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["MatchPrice"] = task_data->MatchPrice;
+ data["MatchQty"] = task_data->MatchQty;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ data["MatchStreamID"] = task_data->MatchStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["MatchCmbNo"] = toUtf(task_data->MatchCmbNo);
+ data["ExchangeMatchNo"] = toUtf(task_data->ExchangeMatchNo);
+ data["MatchUpperStreamID"] = task_data->MatchUpperStreamID;
+ data["CommodityCurrencyGroup"] = toUtf(task_data->CommodityCurrencyGroup);
+ data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency);
+ data["Turnover"] = task_data->Turnover;
+ data["PremiumIncome"] = task_data->PremiumIncome;
+ data["PremiumPay"] = task_data->PremiumPay;
+ data["AccountFee"] = task_data->AccountFee;
+ data["AccountFeeCurrencyGroup"] = toUtf(task_data->AccountFeeCurrencyGroup);
+ data["AccountFeeCurrency"] = toUtf(task_data->AccountFeeCurrency);
+ data["IsManualFee"] = task_data->IsManualFee;
+ data["AccountOtherFee"] = task_data->AccountOtherFee;
+ data["UpperFee"] = task_data->UpperFee;
+ data["UpperFeeCurrencyGroup"] = toUtf(task_data->UpperFeeCurrencyGroup);
+ data["UpperFeeCurrency"] = toUtf(task_data->UpperFeeCurrency);
+ data["IsUpperManualFee"] = task_data->IsUpperManualFee;
+ data["UpperOtherFee"] = task_data->UpperOtherFee;
+ data["MatchDateTime"] = toUtf(task_data->MatchDateTime);
+ data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime);
+ data["CloseProfit"] = task_data->CloseProfit;
+ data["ClosePrice"] = task_data->ClosePrice;
+ data["CloseQty"] = task_data->CloseQty;
+ data["SettleGroupNo"] = toUtf(task_data->SettleGroupNo);
+ data["OperatorNo"] = toUtf(task_data->OperatorNo);
+ data["OperateTime"] = toUtf(task_data->OperateTime);
+ delete task_data;
+ }
+ this->onRspQryHisMatch(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryHisPosition(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIHisPositionQryRsp *task_data = (TapAPIHisPositionQryRsp*)task->task_data;
+ data["SettleDate"] = toUtf(task_data->SettleDate);
+ data["OpenDate"] = toUtf(task_data->OpenDate);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["PositionPrice"] = task_data->PositionPrice;
+ data["PositionQty"] = task_data->PositionQty;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["PositionNo"] = toUtf(task_data->PositionNo);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["CurrencyGroup"] = toUtf(task_data->CurrencyGroup);
+ data["Currency"] = toUtf(task_data->Currency);
+ data["PreSettlePrice"] = task_data->PreSettlePrice;
+ data["SettlePrice"] = task_data->SettlePrice;
+ data["PositionDProfit"] = task_data->PositionDProfit;
+ data["LMEPositionProfit"] = task_data->LMEPositionProfit;
+ data["OptionMarketValue"] = task_data->OptionMarketValue;
+ data["AccountInitialMargin"] = task_data->AccountInitialMargin;
+ data["AccountMaintenanceMargin"] = task_data->AccountMaintenanceMargin;
+ data["UpperInitialMargin"] = task_data->UpperInitialMargin;
+ data["UpperMaintenanceMargin"] = task_data->UpperMaintenanceMargin;
+ data["SettleGroupNo"] = toUtf(task_data->SettleGroupNo);
+ delete task_data;
+ }
+ this->onRspQryHisPosition(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryHisDelivery(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIHisDeliveryQryRsp *task_data = (TapAPIHisDeliveryQryRsp*)task->task_data;
+ data["DeliveryDate"] = toUtf(task_data->DeliveryDate);
+ data["OpenDate"] = toUtf(task_data->OpenDate);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSource"] = task_data->MatchSource;
+ data["OpenSide"] = task_data->OpenSide;
+ data["OpenPrice"] = task_data->OpenPrice;
+ data["DeliveryPrice"] = task_data->DeliveryPrice;
+ data["DeliveryQty"] = task_data->DeliveryQty;
+ data["FrozenQty"] = task_data->FrozenQty;
+ data["OpenNo"] = toUtf(task_data->OpenNo);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["CommodityCurrencyGroupy"] = toUtf(task_data->CommodityCurrencyGroupy);
+ data["CommodityCurrency"] = toUtf(task_data->CommodityCurrency);
+ data["PreSettlePrice"] = task_data->PreSettlePrice;
+ data["DeliveryProfit"] = task_data->DeliveryProfit;
+ data["AccountFrozenInitialMargin"] = task_data->AccountFrozenInitialMargin;
+ data["AccountFrozenMaintenanceMargin"] = task_data->AccountFrozenMaintenanceMargin;
+ data["UpperFrozenInitialMargin"] = task_data->UpperFrozenInitialMargin;
+ data["UpperFrozenMaintenanceMargin"] = task_data->UpperFrozenMaintenanceMargin;
+ data["AccountFeeCurrencyGroup"] = toUtf(task_data->AccountFeeCurrencyGroup);
+ data["AccountFeeCurrency"] = toUtf(task_data->AccountFeeCurrency);
+ data["AccountDeliveryFee"] = task_data->AccountDeliveryFee;
+ data["UpperFeeCurrencyGroup"] = toUtf(task_data->UpperFeeCurrencyGroup);
+ data["UpperFeeCurrency"] = toUtf(task_data->UpperFeeCurrency);
+ data["UpperDeliveryFee"] = task_data->UpperDeliveryFee;
+ data["DeliveryMode"] = task_data->DeliveryMode;
+ data["OperatorNo"] = toUtf(task_data->OperatorNo);
+ data["OperateTime"] = toUtf(task_data->OperateTime);
+ data["SettleGourpNo"] = toUtf(task_data->SettleGourpNo);
+ delete task_data;
+ }
+ this->onRspQryHisDelivery(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryAccountCashAdjust(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIAccountCashAdjustQryRsp *task_data = (TapAPIAccountCashAdjustQryRsp*)task->task_data;
+ data["Date"] = toUtf(task_data->Date);
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["CashAdjustType"] = task_data->CashAdjustType;
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["CashAdjustValue"] = task_data->CashAdjustValue;
+ data["CashAdjustRemark"] = toUtf(task_data->CashAdjustRemark);
+ data["OperateTime"] = toUtf(task_data->OperateTime);
+ data["OperatorNo"] = toUtf(task_data->OperatorNo);
+ data["AccountBank"] = toUtf(task_data->AccountBank);
+ data["BankAccount"] = toUtf(task_data->BankAccount);
+ data["AccountLWFlag"] = task_data->AccountLWFlag;
+ data["CompanyBank"] = toUtf(task_data->CompanyBank);
+ data["InternalBankAccount"] = toUtf(task_data->InternalBankAccount);
+ data["CompanyLWFlag"] = task_data->CompanyLWFlag;
+ delete task_data;
+ }
+ this->onRspQryAccountCashAdjust(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryBill(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIBillQryRsp *task_data = (TapAPIBillQryRsp*)task->task_data;
+ data["Reqdata"] = task_data->Reqdata;
+ data["BillLen"] = task_data->BillLen;
+ data["BillText"] = task_data->BillText;
+ delete task_data;
+ }
+ this->onRspQryBill(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryAccountFeeRent(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIAccountFeeRentQryRsp *task_data = (TapAPIAccountFeeRentQryRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["MatchSource"] = task_data->MatchSource;
+ data["CalculateMode"] = task_data->CalculateMode;
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["OpenCloseFee"] = task_data->OpenCloseFee;
+ data["CloseTodayFee"] = task_data->CloseTodayFee;
+ delete task_data;
+ }
+ this->onRspQryAccountFeeRent(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspQryAccountMarginRent(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIAccountMarginRentQryRsp *task_data = (TapAPIAccountMarginRentQryRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["CalculateMode"] = task_data->CalculateMode;
+ data["CurrencyGroupNo"] = toUtf(task_data->CurrencyGroupNo);
+ data["CurrencyNo"] = toUtf(task_data->CurrencyNo);
+ data["InitialMargin"] = task_data->InitialMargin;
+ data["MaintenanceMargin"] = task_data->MaintenanceMargin;
+ data["SellInitialMargin"] = task_data->SellInitialMargin;
+ data["SellMaintenanceMargin"] = task_data->SellMaintenanceMargin;
+ data["LockMargin"] = task_data->LockMargin;
+ delete task_data;
+ }
+ this->onRspQryAccountMarginRent(task->task_id, task->task_int, task->task_last, data);
+};
+
+void TdApi::processRspHKMarketOrderInsert(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderMarketInsertRsp *task_data = (TapAPIOrderMarketInsertRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["OrderType"] = task_data->OrderType;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["OrderSource"] = task_data->OrderSource;
+ data["BuyPositionEffect"] = task_data->BuyPositionEffect;
+ data["SellPositionEffect"] = task_data->SellPositionEffect;
+ data["OrderBuyPrice"] = task_data->OrderBuyPrice;
+ data["OrderSellPrice"] = task_data->OrderSellPrice;
+ data["OrderBuyQty"] = task_data->OrderBuyQty;
+ data["OrderSellQty"] = task_data->OrderSellQty;
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderBuyNo"] = toUtf(task_data->OrderBuyNo);
+ data["OrderSellNo"] = toUtf(task_data->OrderSellNo);
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["OrderMarketUserNo"] = toUtf(task_data->OrderMarketUserNo);
+ data["OrderMarketTime"] = toUtf(task_data->OrderMarketTime);
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["ClientBuyOrderNo"] = toUtf(task_data->ClientBuyOrderNo);
+ data["ClientSellOrderNo"] = toUtf(task_data->ClientSellOrderNo);
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["Remark"] = toUtf(task_data->Remark);
+ delete task_data;
+ }
+ this->onRspHKMarketOrderInsert(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspHKMarketOrderDelete(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderMarketDeleteRsp *task_data = (TapAPIOrderMarketDeleteRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["OrderType"] = task_data->OrderType;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["OrderSource"] = task_data->OrderSource;
+ data["BuyPositionEffect"] = task_data->BuyPositionEffect;
+ data["SellPositionEffect"] = task_data->SellPositionEffect;
+ data["OrderBuyPrice"] = task_data->OrderBuyPrice;
+ data["OrderSellPrice"] = task_data->OrderSellPrice;
+ data["OrderBuyQty"] = task_data->OrderBuyQty;
+ data["OrderSellQty"] = task_data->OrderSellQty;
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderBuyNo"] = toUtf(task_data->OrderBuyNo);
+ data["OrderSellNo"] = toUtf(task_data->OrderSellNo);
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["OrderMarketUserNo"] = toUtf(task_data->OrderMarketUserNo);
+ data["OrderMarketTime"] = toUtf(task_data->OrderMarketTime);
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["ClientBuyOrderNo"] = toUtf(task_data->ClientBuyOrderNo);
+ data["ClientSellOrderNo"] = toUtf(task_data->ClientSellOrderNo);
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["Remark"] = toUtf(task_data->Remark);
+ delete task_data;
+ }
+ this->onRspHKMarketOrderDelete(task->task_id, task->task_int, data);
+};
+
+void TdApi::processHKMarketQuoteNotice(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderQuoteMarketNotice *task_data = (TapAPIOrderQuoteMarketNotice*)task->task_data;
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["OrderSide"] = task_data->OrderSide;
+ data["OrderQty"] = task_data->OrderQty;
+ delete task_data;
+ }
+ this->onHKMarketQuoteNotice(data);
+};
+
+void TdApi::processRspOrderLocalRemove(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderLocalRemoveRsp *task_data = (TapAPIOrderLocalRemoveRsp*)task->task_data;
+ data["req"] = task_data->req;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ delete task_data;
+ }
+ this->onRspOrderLocalRemove(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspOrderLocalInput(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderLocalInputRsp *task_data = (TapAPIOrderLocalInputRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo);
+ data["ClientID"] = toUtf(task_data->ClientID);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspOrderLocalInput(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspOrderLocalModify(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderLocalModifyRsp *task_data = (TapAPIOrderLocalModifyRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo);
+ data["ClientID"] = toUtf(task_data->ClientID);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspOrderLocalModify(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspOrderLocalTransfer(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIOrderLocalTransferRsp *task_data = (TapAPIOrderLocalTransferRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["ContractNo2"] = toUtf(task_data->ContractNo2);
+ data["StrikePrice2"] = toUtf(task_data->StrikePrice2);
+ data["CallOrPutFlag2"] = task_data->CallOrPutFlag2;
+ data["OrderType"] = task_data->OrderType;
+ data["OrderSource"] = task_data->OrderSource;
+ data["TimeInForce"] = task_data->TimeInForce;
+ data["ExpireTime"] = toUtf(task_data->ExpireTime);
+ data["IsRiskOrder"] = task_data->IsRiskOrder;
+ data["OrderSide"] = task_data->OrderSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["PositionEffect2"] = task_data->PositionEffect2;
+ data["InquiryNo"] = toUtf(task_data->InquiryNo);
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["OrderPrice"] = task_data->OrderPrice;
+ data["OrderPrice2"] = task_data->OrderPrice2;
+ data["StopPrice"] = task_data->StopPrice;
+ data["OrderQty"] = task_data->OrderQty;
+ data["OrderMinQty"] = task_data->OrderMinQty;
+ data["RefInt"] = task_data->RefInt;
+ data["RefDouble"] = task_data->RefDouble;
+ data["RefString"] = toUtf(task_data->RefString);
+ data["MinClipSize"] = task_data->MinClipSize;
+ data["MaxClipSize"] = task_data->MaxClipSize;
+ data["LicenseNo"] = toUtf(task_data->LicenseNo);
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["OrderNo"] = toUtf(task_data->OrderNo);
+ data["ClientOrderNo"] = toUtf(task_data->ClientOrderNo);
+ data["ClientID"] = toUtf(task_data->ClientID);
+ data["TacticsType"] = task_data->TacticsType;
+ data["TriggerCondition"] = task_data->TriggerCondition;
+ data["TriggerPriceType"] = task_data->TriggerPriceType;
+ data["AddOneIsValid"] = task_data->AddOneIsValid;
+ data["ClientLocalIP"] = toUtf(task_data->ClientLocalIP);
+ data["ClientMac"] = toUtf(task_data->ClientMac);
+ data["ClientIP"] = toUtf(task_data->ClientIP);
+ data["OrderStreamID"] = task_data->OrderStreamID;
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["UpperChannelNo"] = toUtf(task_data->UpperChannelNo);
+ data["OrderLocalNo"] = toUtf(task_data->OrderLocalNo);
+ data["UpperStreamID"] = task_data->UpperStreamID;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["OrderExchangeSystemNo"] = toUtf(task_data->OrderExchangeSystemNo);
+ data["OrderParentSystemNo"] = toUtf(task_data->OrderParentSystemNo);
+ data["OrderInsertUserNo"] = toUtf(task_data->OrderInsertUserNo);
+ data["OrderInsertTime"] = toUtf(task_data->OrderInsertTime);
+ data["OrderCommandUserNo"] = toUtf(task_data->OrderCommandUserNo);
+ data["OrderUpdateUserNo"] = toUtf(task_data->OrderUpdateUserNo);
+ data["OrderUpdateTime"] = toUtf(task_data->OrderUpdateTime);
+ data["OrderState"] = task_data->OrderState;
+ data["OrderMatchPrice"] = task_data->OrderMatchPrice;
+ data["OrderMatchPrice2"] = task_data->OrderMatchPrice2;
+ data["OrderMatchQty"] = task_data->OrderMatchQty;
+ data["OrderMatchQty2"] = task_data->OrderMatchQty2;
+ data["ErrorCode"] = task_data->ErrorCode;
+ data["ErrorText"] = toUtf(task_data->ErrorText);
+ data["IsBackInput"] = task_data->IsBackInput;
+ data["IsDeleted"] = task_data->IsDeleted;
+ data["IsAddOne"] = task_data->IsAddOne;
+ delete task_data;
+ }
+ this->onRspOrderLocalTransfer(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspFillLocalInput(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFillLocalInputRsp *task_data = (TapAPIFillLocalInputRsp*)task->task_data;
+ data["AccountNo"] = toUtf(task_data->AccountNo);
+ data["ExchangeNo"] = toUtf(task_data->ExchangeNo);
+ data["CommodityType"] = task_data->CommodityType;
+ data["CommodityNo"] = toUtf(task_data->CommodityNo);
+ data["ContractNo"] = toUtf(task_data->ContractNo);
+ data["StrikePrice"] = toUtf(task_data->StrikePrice);
+ data["CallOrPutFlag"] = task_data->CallOrPutFlag;
+ data["MatchSide"] = task_data->MatchSide;
+ data["PositionEffect"] = task_data->PositionEffect;
+ data["HedgeFlag"] = task_data->HedgeFlag;
+ data["MatchPrice"] = task_data->MatchPrice;
+ data["MatchQty"] = task_data->MatchQty;
+ data["OrderSystemNo"] = toUtf(task_data->OrderSystemNo);
+ data["UpperMatchNo"] = toUtf(task_data->UpperMatchNo);
+ data["MatchDateTime"] = toUtf(task_data->MatchDateTime);
+ data["UpperMatchDateTime"] = toUtf(task_data->UpperMatchDateTime);
+ data["UpperNo"] = toUtf(task_data->UpperNo);
+ data["IsAddOne"] = task_data->IsAddOne;
+ data["FeeCurrencyGroup"] = toUtf(task_data->FeeCurrencyGroup);
+ data["FeeCurrency"] = toUtf(task_data->FeeCurrency);
+ data["FeeValue"] = task_data->FeeValue;
+ data["IsManualFee"] = task_data->IsManualFee;
+ data["ClosePositionPrice"] = task_data->ClosePositionPrice;
+ delete task_data;
+ }
+ this->onRspFillLocalInput(task->task_id, task->task_int, data);
+};
+
+void TdApi::processRspFillLocalRemove(Task *task)
+{
+ gil_scoped_acquire acquire;
+ dict data;
+ if (task->task_data)
+ {
+ TapAPIFillLocalRemoveRsp *task_data = (TapAPIFillLocalRemoveRsp*)task->task_data;
+ data["ServerFlag"] = task_data->ServerFlag;
+ data["MatchNo"] = toUtf(task_data->MatchNo);
+ delete task_data;
+ }
+ this->onRspFillLocalRemove(task->task_id, task->task_int, data);
+};
+
diff --git a/vnpy/api/tap/generator/tap_td_source_switch.cpp b/vnpy/api/tap/generator/tap_td_source_switch.cpp
new file mode 100644
index 0000000000..83ceff47b9
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_switch.cpp
@@ -0,0 +1,300 @@
+case ONCONNECT:
+{
+ this->processConnect(&task);
+ break;
+}
+
+case ONRSPLOGIN:
+{
+ this->processRspLogin(&task);
+ break;
+}
+
+case ONRTNCONTACTINFO:
+{
+ this->processRtnContactInfo(&task);
+ break;
+}
+
+case ONRSPREQUESTVERTIFICATECODE:
+{
+ this->processRspRequestVertificateCode(&task);
+ break;
+}
+
+case ONEXPRIATIONDATE:
+{
+ this->processExpriationDate(&task);
+ break;
+}
+
+case ONAPIREADY:
+{
+ this->processAPIReady(&task);
+ break;
+}
+
+case ONDISCONNECT:
+{
+ this->processDisconnect(&task);
+ break;
+}
+
+case ONRSPCHANGEPASSWORD:
+{
+ this->processRspChangePassword(&task);
+ break;
+}
+
+case ONRSPAUTHPASSWORD:
+{
+ this->processRspAuthPassword(&task);
+ break;
+}
+
+case ONRSPQRYTRADINGDATE:
+{
+ this->processRspQryTradingDate(&task);
+ break;
+}
+
+case ONRSPSETRESERVEDINFO:
+{
+ this->processRspSetReservedInfo(&task);
+ break;
+}
+
+case ONRSPQRYACCOUNT:
+{
+ this->processRspQryAccount(&task);
+ break;
+}
+
+case ONRSPQRYFUND:
+{
+ this->processRspQryFund(&task);
+ break;
+}
+
+case ONRTNFUND:
+{
+ this->processRtnFund(&task);
+ break;
+}
+
+case ONRSPQRYEXCHANGE:
+{
+ this->processRspQryExchange(&task);
+ break;
+}
+
+case ONRSPQRYCOMMODITY:
+{
+ this->processRspQryCommodity(&task);
+ break;
+}
+
+case ONRSPQRYCONTRACT:
+{
+ this->processRspQryContract(&task);
+ break;
+}
+
+case ONRTNCONTRACT:
+{
+ this->processRtnContract(&task);
+ break;
+}
+
+case ONRSPORDERACTION:
+{
+ this->processRspOrderAction(&task);
+ break;
+}
+
+case ONRTNORDER:
+{
+ this->processRtnOrder(&task);
+ break;
+}
+
+case ONRSPQRYORDER:
+{
+ this->processRspQryOrder(&task);
+ break;
+}
+
+case ONRSPQRYORDERPROCESS:
+{
+ this->processRspQryOrderProcess(&task);
+ break;
+}
+
+case ONRSPQRYFILL:
+{
+ this->processRspQryFill(&task);
+ break;
+}
+
+case ONRTNFILL:
+{
+ this->processRtnFill(&task);
+ break;
+}
+
+case ONRSPQRYPOSITION:
+{
+ this->processRspQryPosition(&task);
+ break;
+}
+
+case ONRTNPOSITION:
+{
+ this->processRtnPosition(&task);
+ break;
+}
+
+case ONRSPQRYPOSITIONSUMMARY:
+{
+ this->processRspQryPositionSummary(&task);
+ break;
+}
+
+case ONRTNPOSITIONSUMMARY:
+{
+ this->processRtnPositionSummary(&task);
+ break;
+}
+
+case ONRTNPOSITIONPROFIT:
+{
+ this->processRtnPositionProfit(&task);
+ break;
+}
+
+case ONRSPQRYCURRENCY:
+{
+ this->processRspQryCurrency(&task);
+ break;
+}
+
+case ONRSPQRYTRADEMESSAGE:
+{
+ this->processRspQryTradeMessage(&task);
+ break;
+}
+
+case ONRTNTRADEMESSAGE:
+{
+ this->processRtnTradeMessage(&task);
+ break;
+}
+
+case ONRSPQRYHISORDER:
+{
+ this->processRspQryHisOrder(&task);
+ break;
+}
+
+case ONRSPQRYHISORDERPROCESS:
+{
+ this->processRspQryHisOrderProcess(&task);
+ break;
+}
+
+case ONRSPQRYHISMATCH:
+{
+ this->processRspQryHisMatch(&task);
+ break;
+}
+
+case ONRSPQRYHISPOSITION:
+{
+ this->processRspQryHisPosition(&task);
+ break;
+}
+
+case ONRSPQRYHISDELIVERY:
+{
+ this->processRspQryHisDelivery(&task);
+ break;
+}
+
+case ONRSPQRYACCOUNTCASHADJUST:
+{
+ this->processRspQryAccountCashAdjust(&task);
+ break;
+}
+
+case ONRSPQRYBILL:
+{
+ this->processRspQryBill(&task);
+ break;
+}
+
+case ONRSPQRYACCOUNTFEERENT:
+{
+ this->processRspQryAccountFeeRent(&task);
+ break;
+}
+
+case ONRSPQRYACCOUNTMARGINRENT:
+{
+ this->processRspQryAccountMarginRent(&task);
+ break;
+}
+
+case ONRSPHKMARKETORDERINSERT:
+{
+ this->processRspHKMarketOrderInsert(&task);
+ break;
+}
+
+case ONRSPHKMARKETORDERDELETE:
+{
+ this->processRspHKMarketOrderDelete(&task);
+ break;
+}
+
+case ONHKMARKETQUOTENOTICE:
+{
+ this->processHKMarketQuoteNotice(&task);
+ break;
+}
+
+case ONRSPORDERLOCALREMOVE:
+{
+ this->processRspOrderLocalRemove(&task);
+ break;
+}
+
+case ONRSPORDERLOCALINPUT:
+{
+ this->processRspOrderLocalInput(&task);
+ break;
+}
+
+case ONRSPORDERLOCALMODIFY:
+{
+ this->processRspOrderLocalModify(&task);
+ break;
+}
+
+case ONRSPORDERLOCALTRANSFER:
+{
+ this->processRspOrderLocalTransfer(&task);
+ break;
+}
+
+case ONRSPFILLLOCALINPUT:
+{
+ this->processRspFillLocalInput(&task);
+ break;
+}
+
+case ONRSPFILLLOCALREMOVE:
+{
+ this->processRspFillLocalRemove(&task);
+ break;
+}
+
diff --git a/vnpy/api/tap/generator/tap_td_source_task.cpp b/vnpy/api/tap/generator/tap_td_source_task.cpp
new file mode 100644
index 0000000000..6a7e701307
--- /dev/null
+++ b/vnpy/api/tap/generator/tap_td_source_task.cpp
@@ -0,0 +1,702 @@
+void TdApi::OnConnect()
+{
+ Task task = Task();
+ task.task_name = ONCONNECT;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspLogin(int errorCode, TapAPITradeLoginRspInfo *loginRspInfo)
+{
+ Task task = Task();
+ task.task_name = ONRSPLOGIN;
+ task.task_int = errorCode;
+ if (loginRspInfo)
+ {
+ TapAPITradeLoginRspInfo *task_data = new TapAPITradeLoginRspInfo();
+ *task_data = *loginRspInfo;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnContactInfo(int errorCode, char isLast, string ContactInfo)
+{
+ Task task = Task();
+ task.task_name = ONRTNCONTACTINFO;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ task.task_string = ContactInfo;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspRequestVertificateCode(unsigned int sessionID, int errorCode, TapAPIRequestVertificateCodeRsp *rsp)
+{
+ Task task = Task();
+ task.task_name = ONRSPREQUESTVERTIFICATECODE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (rsp)
+ {
+ TapAPIRequestVertificateCodeRsp *task_data = new TapAPIRequestVertificateCodeRsp();
+ *task_data = *rsp;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnExpriationDate(string date, int days)
+{
+ Task task = Task();
+ task.task_name = ONEXPRIATIONDATE;
+ task.task_string = date;
+ task.task_int = days;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnAPIReady(int errorCode)
+{
+ Task task = Task();
+ task.task_name = ONAPIREADY;
+ task.task_int = errorCode;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnDisconnect(int reasonCode)
+{
+ Task task = Task();
+ task.task_name = ONDISCONNECT;
+ task.task_int = reasonCode;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspChangePassword(unsigned int sessionID, int errorCode)
+{
+ Task task = Task();
+ task.task_name = ONRSPCHANGEPASSWORD;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspAuthPassword(unsigned int sessionID, int errorCode)
+{
+ Task task = Task();
+ task.task_name = ONRSPAUTHPASSWORD;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryTradingDate(unsigned int sessionID, int errorCode, TapAPITradingCalendarQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYTRADINGDATE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPITradingCalendarQryRsp *task_data = new TapAPITradingCalendarQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspSetReservedInfo(unsigned int sessionID, int errorCode, string info)
+{
+ Task task = Task();
+ task.task_name = ONRSPSETRESERVEDINFO;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_string = info;
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryAccount(unsigned int sessionID, unsigned int errorCode, char isLast, TapAPIAccountInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYACCOUNT;
+ task.task_id = sessionID;
+ task.task_id = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIAccountInfo *task_data = new TapAPIAccountInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryFund(unsigned int sessionID, int errorCode, char isLast, TapAPIFundData *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYFUND;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIFundData *task_data = new TapAPIFundData();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnFund(TapAPIFundData *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNFUND;
+ if (info)
+ {
+ TapAPIFundData *task_data = new TapAPIFundData();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryExchange(unsigned int sessionID, int errorCode, char isLast, TapAPIExchangeInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYEXCHANGE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIExchangeInfo *task_data = new TapAPIExchangeInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryCommodity(unsigned int sessionID, int errorCode, char isLast, TapAPICommodityInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYCOMMODITY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPICommodityInfo *task_data = new TapAPICommodityInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryContract(unsigned int sessionID, int errorCode, char isLast, TapAPITradeContractInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYCONTRACT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPITradeContractInfo *task_data = new TapAPITradeContractInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnContract(TapAPITradeContractInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNCONTRACT;
+ if (info)
+ {
+ TapAPITradeContractInfo *task_data = new TapAPITradeContractInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspOrderAction(unsigned int sessionID, int errorCode, TapAPIOrderActionRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPORDERACTION;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderActionRsp *task_data = new TapAPIOrderActionRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnOrder(TapAPIOrderInfoNotice *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNORDER;
+ if (info)
+ {
+ TapAPIOrderInfoNotice *task_data = new TapAPIOrderInfoNotice();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryOrder(unsigned int sessionID, int errorCode, char isLast, TapAPIOrderInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYORDER;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIOrderInfo *task_data = new TapAPIOrderInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryOrderProcess(unsigned int sessionID, int errorCode, char isLast, TapAPIOrderInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYORDERPROCESS;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIOrderInfo *task_data = new TapAPIOrderInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryFill(unsigned int sessionID, int errorCode, char isLast, TapAPIFillInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYFILL;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIFillInfo *task_data = new TapAPIFillInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnFill(TapAPIFillInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNFILL;
+ if (info)
+ {
+ TapAPIFillInfo *task_data = new TapAPIFillInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryPosition(unsigned int sessionID, int errorCode, char isLast, TapAPIPositionInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYPOSITION;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIPositionInfo *task_data = new TapAPIPositionInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnPosition(TapAPIPositionInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNPOSITION;
+ if (info)
+ {
+ TapAPIPositionInfo *task_data = new TapAPIPositionInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryPositionSummary(unsigned int sessionID, int errorCode, char isLast, TapAPIPositionSummary *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYPOSITIONSUMMARY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIPositionSummary *task_data = new TapAPIPositionSummary();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnPositionSummary(TapAPIPositionSummary *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNPOSITIONSUMMARY;
+ if (info)
+ {
+ TapAPIPositionSummary *task_data = new TapAPIPositionSummary();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnPositionProfit(TapAPIPositionProfitNotice *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNPOSITIONPROFIT;
+ if (info)
+ {
+ TapAPIPositionProfitNotice *task_data = new TapAPIPositionProfitNotice();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryCurrency(unsigned int sessionID, int errorCode, char isLast, TapAPICurrencyInfo *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYCURRENCY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPICurrencyInfo *task_data = new TapAPICurrencyInfo();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryTradeMessage(unsigned int sessionID, int errorCode, char isLast, TapAPITradeMessage *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYTRADEMESSAGE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPITradeMessage *task_data = new TapAPITradeMessage();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRtnTradeMessage(TapAPITradeMessage *info)
+{
+ Task task = Task();
+ task.task_name = ONRTNTRADEMESSAGE;
+ if (info)
+ {
+ TapAPITradeMessage *task_data = new TapAPITradeMessage();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryHisOrder(unsigned int sessionID, int errorCode, char isLast, TapAPIHisOrderQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYHISORDER;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIHisOrderQryRsp *task_data = new TapAPIHisOrderQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryHisOrderProcess(unsigned int sessionID, int errorCode, char isLast, TapAPIHisOrderProcessQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYHISORDERPROCESS;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIHisOrderProcessQryRsp *task_data = new TapAPIHisOrderProcessQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryHisMatch(unsigned int sessionID, int errorCode, char isLast, TapAPIHisMatchQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYHISMATCH;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIHisMatchQryRsp *task_data = new TapAPIHisMatchQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryHisPosition(unsigned int sessionID, int errorCode, char isLast, TapAPIHisPositionQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYHISPOSITION;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIHisPositionQryRsp *task_data = new TapAPIHisPositionQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryHisDelivery(unsigned int sessionID, int errorCode, char isLast, TapAPIHisDeliveryQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYHISDELIVERY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIHisDeliveryQryRsp *task_data = new TapAPIHisDeliveryQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryAccountCashAdjust(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountCashAdjustQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYACCOUNTCASHADJUST;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIAccountCashAdjustQryRsp *task_data = new TapAPIAccountCashAdjustQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryBill(unsigned int sessionID, int errorCode, char isLast, TapAPIBillQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYBILL;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIBillQryRsp *task_data = new TapAPIBillQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryAccountFeeRent(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountFeeRentQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYACCOUNTFEERENT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIAccountFeeRentQryRsp *task_data = new TapAPIAccountFeeRentQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspQryAccountMarginRent(unsigned int sessionID, int errorCode, char isLast, TapAPIAccountMarginRentQryRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPQRYACCOUNTMARGINRENT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ task.task_last = isLast;
+ if (info)
+ {
+ TapAPIAccountMarginRentQryRsp *task_data = new TapAPIAccountMarginRentQryRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspHKMarketOrderInsert(unsigned int sessionID, int errorCode, TapAPIOrderMarketInsertRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPHKMARKETORDERINSERT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderMarketInsertRsp *task_data = new TapAPIOrderMarketInsertRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspHKMarketOrderDelete(unsigned int sessionID, int errorCode, TapAPIOrderMarketDeleteRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPHKMARKETORDERDELETE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderMarketDeleteRsp *task_data = new TapAPIOrderMarketDeleteRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnHKMarketQuoteNotice(TapAPIOrderQuoteMarketNotice *info)
+{
+ Task task = Task();
+ task.task_name = ONHKMARKETQUOTENOTICE;
+ if (info)
+ {
+ TapAPIOrderQuoteMarketNotice *task_data = new TapAPIOrderQuoteMarketNotice();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspOrderLocalRemove(unsigned int sessionID, int errorCode, TapAPIOrderLocalRemoveRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPORDERLOCALREMOVE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderLocalRemoveRsp *task_data = new TapAPIOrderLocalRemoveRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspOrderLocalInput(unsigned int sessionID, int errorCode, TapAPIOrderLocalInputRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPORDERLOCALINPUT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderLocalInputRsp *task_data = new TapAPIOrderLocalInputRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspOrderLocalModify(unsigned int sessionID, int errorCode, TapAPIOrderLocalModifyRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPORDERLOCALMODIFY;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderLocalModifyRsp *task_data = new TapAPIOrderLocalModifyRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspOrderLocalTransfer(unsigned int sessionID, int errorCode, TapAPIOrderLocalTransferRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPORDERLOCALTRANSFER;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIOrderLocalTransferRsp *task_data = new TapAPIOrderLocalTransferRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspFillLocalInput(unsigned int sessionID, int errorCode, TapAPIFillLocalInputRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPFILLLOCALINPUT;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIFillLocalInputRsp *task_data = new TapAPIFillLocalInputRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
+void TdApi::OnRspFillLocalRemove(unsigned int sessionID, int errorCode, TapAPIFillLocalRemoveRsp *info)
+{
+ Task task = Task();
+ task.task_name = ONRSPFILLLOCALREMOVE;
+ task.task_id = sessionID;
+ task.task_int = errorCode;
+ if (info)
+ {
+ TapAPIFillLocalRemoveRsp *task_data = new TapAPIFillLocalRemoveRsp();
+ *task_data = *info;
+ task.task_data = task_data;
+ }
+ this->task_queue.push(task);
+};
+
diff --git a/vnpy/api/tap/vntap/include/pybind11/attr.h b/vnpy/api/tap/include/pybind11/attr.h
similarity index 98%
rename from vnpy/api/tap/vntap/include/pybind11/attr.h
rename to vnpy/api/tap/include/pybind11/attr.h
index 8732cfe103..dce875a6b9 100644
--- a/vnpy/api/tap/vntap/include/pybind11/attr.h
+++ b/vnpy/api/tap/include/pybind11/attr.h
@@ -214,14 +214,11 @@ struct type_record {
/// How large is the underlying C++ type?
size_t type_size = 0;
- /// What is the alignment of the underlying C++ type?
- size_t type_align = 0;
-
/// How large is the type's holder?
size_t holder_size = 0;
/// The global operator new can be overridden with a class-specific variant
- void *(*operator_new)(size_t) = nullptr;
+ void *(*operator_new)(size_t) = ::operator new;
/// Function pointer to class_<..>::init_instance
void (*init_instance)(instance *, const void *) = nullptr;
@@ -281,7 +278,7 @@ struct type_record {
}
};
-inline function_call::function_call(const function_record &f, handle p) :
+inline function_call::function_call(function_record &f, handle p) :
func(f), parent(p) {
args.reserve(f.nargs);
args_convert.reserve(f.nargs);
diff --git a/vnpy/api/tap/vntap/include/pybind11/buffer_info.h b/vnpy/api/tap/include/pybind11/buffer_info.h
similarity index 100%
rename from vnpy/api/tap/vntap/include/pybind11/buffer_info.h
rename to vnpy/api/tap/include/pybind11/buffer_info.h
diff --git a/vnpy/api/tap/vntap/include/pybind11/cast.h b/vnpy/api/tap/include/pybind11/cast.h
similarity index 92%
rename from vnpy/api/tap/vntap/include/pybind11/cast.h
rename to vnpy/api/tap/include/pybind11/cast.h
index 80abb2b93a..2145450835 100644
--- a/vnpy/api/tap/vntap/include/pybind11/cast.h
+++ b/vnpy/api/tap/include/pybind11/cast.h
@@ -17,7 +17,6 @@
#include
#include
#include
-#include
#if defined(PYBIND11_CPP17)
# if defined(__has_include)
@@ -571,17 +570,7 @@ class type_caster_generic {
// Lazy allocation for unallocated values:
if (vptr == nullptr) {
auto *type = v_h.type ? v_h.type : typeinfo;
- if (type->operator_new) {
- vptr = type->operator_new(type->type_size);
- } else {
- #if defined(PYBIND11_CPP17)
- if (type->type_align > __STDCPP_DEFAULT_NEW_ALIGNMENT__)
- vptr = ::operator new(type->type_size,
- (std::align_val_t) type->type_align);
- else
- #endif
- vptr = ::operator new(type->type_size);
- }
+ vptr = type->operator_new(type->type_size);
}
value = vptr;
}
@@ -785,47 +774,11 @@ template struct is_copy_constructible, is_copy_constructible> {};
#endif
-NAMESPACE_END(detail)
-
-// polymorphic_type_hook::get(src, tinfo) determines whether the object pointed
-// to by `src` actually is an instance of some class derived from `itype`.
-// If so, it sets `tinfo` to point to the std::type_info representing that derived
-// type, and returns a pointer to the start of the most-derived object of that type
-// (in which `src` is a subobject; this will be the same address as `src` in most
-// single inheritance cases). If not, or if `src` is nullptr, it simply returns `src`
-// and leaves `tinfo` at its default value of nullptr.
-//
-// The default polymorphic_type_hook just returns src. A specialization for polymorphic
-// types determines the runtime type of the passed object and adjusts the this-pointer
-// appropriately via dynamic_cast. This is what enables a C++ Animal* to appear
-// to Python as a Dog (if Dog inherits from Animal, Animal is polymorphic, Dog is
-// registered with pybind11, and this Animal is in fact a Dog).
-//
-// You may specialize polymorphic_type_hook yourself for types that want to appear
-// polymorphic to Python but do not use C++ RTTI. (This is a not uncommon pattern
-// in performance-sensitive applications, used most notably in LLVM.)
-template
-struct polymorphic_type_hook
-{
- static const void *get(const itype *src, const std::type_info*&) { return src; }
-};
-template
-struct polymorphic_type_hook::value>>
-{
- static const void *get(const itype *src, const std::type_info*& type) {
- type = src ? &typeid(*src) : nullptr;
- return dynamic_cast(src);
- }
-};
-
-NAMESPACE_BEGIN(detail)
-
/// Generic type caster for objects stored on the heap
template class type_caster_base : public type_caster_generic {
using itype = intrinsic_t;
-
public:
- static constexpr auto name = _();
+ static PYBIND11_DESCR name() { return type_descr(_()); }
type_caster_base() : type_caster_base(typeid(type)) { }
explicit type_caster_base(const std::type_info &info) : type_caster_generic(info) { }
@@ -840,28 +793,32 @@ template class type_caster_base : public type_caster_generic {
return cast(&src, return_value_policy::move, parent);
}
- // Returns a (pointer, type_info) pair taking care of necessary type lookup for a
- // polymorphic type (using RTTI by default, but can be overridden by specializing
- // polymorphic_type_hook). If the instance isn't derived, returns the base version.
+ // Returns a (pointer, type_info) pair taking care of necessary RTTI type lookup for a
+ // polymorphic type. If the instance isn't derived, returns the non-RTTI base version.
+ template ::value, int> = 0>
static std::pair src_and_type(const itype *src) {
+ const void *vsrc = src;
auto &cast_type = typeid(itype);
const std::type_info *instance_type = nullptr;
- const void *vsrc = polymorphic_type_hook::get(src, instance_type);
- if (instance_type && !same_type(cast_type, *instance_type)) {
- // This is a base pointer to a derived type. If the derived type is registered
- // with pybind11, we want to make the full derived object available.
- // In the typical case where itype is polymorphic, we get the correct
- // derived pointer (which may be != base pointer) by a dynamic_cast to
- // most derived type. If itype is not polymorphic, we won't get here
- // except via a user-provided specialization of polymorphic_type_hook,
- // and the user has promised that no this-pointer adjustment is
- // required in that case, so it's OK to use static_cast.
- if (const auto *tpi = get_type_info(*instance_type))
- return {vsrc, tpi};
+ if (vsrc) {
+ instance_type = &typeid(*src);
+ if (!same_type(cast_type, *instance_type)) {
+ // This is a base pointer to a derived type; if it is a pybind11-registered type, we
+ // can get the correct derived pointer (which may be != base pointer) by a
+ // dynamic_cast to most derived type:
+ if (auto *tpi = get_type_info(*instance_type))
+ return {dynamic_cast(src), const_cast(tpi)};
+ }
}
// Otherwise we have either a nullptr, an `itype` pointer, or an unknown derived pointer, so
// don't do a cast
- return type_caster_generic::src_and_type(src, cast_type, instance_type);
+ return type_caster_generic::src_and_type(vsrc, cast_type, instance_type);
+ }
+
+ // Non-polymorphic type, so no dynamic casting; just call the generic version directly
+ template ::value, int> = 0>
+ static std::pair src_and_type(const itype *src) {
+ return type_caster_generic::src_and_type(src, typeid(itype));
}
static handle cast(const itype *src, return_value_policy policy, handle parent) {
@@ -878,7 +835,7 @@ template class type_caster_base : public type_caster_generic {
nullptr, nullptr, holder);
}
- template using cast_op_type = detail::cast_op_type;
+ template using cast_op_type = cast_op_type;
operator itype*() { return (type *) value; }
operator itype&() { if (!value) throw reference_cast_error(); return *((itype *) value); }
@@ -928,7 +885,7 @@ template class type_caster> {
"std::reference_wrapper caster requires T to have a caster with an `T &` operator");
public:
bool load(handle src, bool convert) { return subcaster.load(src, convert); }
- static constexpr auto name = caster_t::name;
+ static PYBIND11_DESCR name() { return caster_t::name(); }
static handle cast(const std::reference_wrapper &src, return_value_policy policy, handle parent) {
// It is definitely wrong to take ownership of this pointer, so mask that rvp
if (policy == return_value_policy::take_ownership || policy == return_value_policy::automatic)
@@ -943,7 +900,7 @@ template class type_caster> {
protected: \
type value; \
public: \
- static constexpr auto name = py_name; \
+ static PYBIND11_DESCR name() { return type_descr(py_name); } \
template >::value, int> = 0> \
static handle cast(T_ *src, return_value_policy policy, handle parent) { \
if (!src) return none().release(); \
@@ -1020,34 +977,20 @@ struct type_caster::value && !is_std_char_t
return true;
}
- template
- static typename std::enable_if::value, handle>::type
- cast(U src, return_value_policy /* policy */, handle /* parent */) {
- return PyFloat_FromDouble((double) src);
- }
-
- template
- static typename std::enable_if::value && std::is_signed::value && (sizeof(U) <= sizeof(long)), handle>::type
- cast(U src, return_value_policy /* policy */, handle /* parent */) {
- return PYBIND11_LONG_FROM_SIGNED((long) src);
- }
-
- template
- static typename std::enable_if::value && std::is_unsigned::value && (sizeof(U) <= sizeof(unsigned long)), handle>::type
- cast(U src, return_value_policy /* policy */, handle /* parent */) {
- return PYBIND11_LONG_FROM_UNSIGNED((unsigned long) src);
- }
-
- template
- static typename std::enable_if::value && std::is_signed::value && (sizeof(U) > sizeof(long)), handle>::type
- cast(U src, return_value_policy /* policy */, handle /* parent */) {
- return PyLong_FromLongLong((long long) src);
- }
-
- template
- static typename std::enable_if::value && std::is_unsigned::value && (sizeof(U) > sizeof(unsigned long)), handle>::type
- cast(U src, return_value_policy /* policy */, handle /* parent */) {
- return PyLong_FromUnsignedLongLong((unsigned long long) src);
+ static handle cast(T src, return_value_policy /* policy */, handle /* parent */) {
+ if (std::is_floating_point::value) {
+ return PyFloat_FromDouble((double) src);
+ } else if (sizeof(T) <= sizeof(long)) {
+ if (std::is_signed::value)
+ return PyLong_FromLong((long) src);
+ else
+ return PyLong_FromUnsignedLong((unsigned long) src);
+ } else {
+ if (std::is_signed::value)
+ return PyLong_FromLongLong((long long) src);
+ else
+ return PyLong_FromUnsignedLongLong((unsigned long long) src);
+ }
}
PYBIND11_TYPE_CASTER(T, _::value>("int", "float"));
@@ -1106,7 +1049,7 @@ template <> class type_caster : public type_caster {
template using cast_op_type = void*&;
operator void *&() { return value; }
- static constexpr auto name = _("capsule");
+ static PYBIND11_DESCR name() { return type_descr(_("capsule")); }
private:
void *value = nullptr;
};
@@ -1349,7 +1292,7 @@ template struct type_caster using cast_op_type = pybind11::detail::cast_op_type<_T>;
};
@@ -1374,7 +1317,9 @@ template class Tuple, typename... Ts> class tuple_caster
return cast_impl(std::forward(src), policy, parent, indices{});
}
- static constexpr auto name = _("Tuple[") + concat(make_caster::name...) + _("]");
+ static PYBIND11_DESCR name() {
+ return type_descr(_("Tuple[") + detail::concat(make_caster::name()...) + _("]"));
+ }
template using cast_op_type = type;
@@ -1519,7 +1464,7 @@ struct move_only_holder_caster {
auto *ptr = holder_helper::get(src);
return type_caster_base::cast_holder(ptr, std::addressof(src));
}
- static constexpr auto name = type_caster_base::name;
+ static PYBIND11_DESCR name() { return type_caster_base::name(); }
};
template
@@ -1550,10 +1495,10 @@ template struct is_holder_type :
template struct is_holder_type> :
std::true_type {};
-template struct handle_type_name { static constexpr auto name = _(); };
-template <> struct handle_type_name { static constexpr auto name = _(PYBIND11_BYTES_NAME); };
-template <> struct handle_type_name { static constexpr auto name = _("*args"); };
-template <> struct handle_type_name { static constexpr auto name = _("**kwargs"); };
+template struct handle_type_name { static PYBIND11_DESCR name() { return _(); } };
+template <> struct handle_type_name { static PYBIND11_DESCR name() { return _(PYBIND11_BYTES_NAME); } };
+template <> struct handle_type_name { static PYBIND11_DESCR name() { return _("*args"); } };
+template <> struct handle_type_name { static PYBIND11_DESCR name() { return _("**kwargs"); } };
template
struct pyobject_caster {
@@ -1571,7 +1516,7 @@ struct pyobject_caster {
static handle cast(const handle &src, return_value_policy /* policy */, handle /* parent */) {
return src.inc_ref();
}
- PYBIND11_TYPE_CASTER(type, handle_type_name::name);
+ PYBIND11_TYPE_CASTER(type, handle_type_name::name());
};
template
@@ -1611,8 +1556,7 @@ template using move_never = none_of, move_if_unrefer
// everything else returns a reference/pointer to a local variable.
template using cast_is_temporary_value_reference = bool_constant<
(std::is_reference::value || std::is_pointer::value) &&
- !std::is_base_of>::value &&
- !std::is_same, void>::value
+ !std::is_base_of>::value
>;
// When a value returned from a C++ function is being cast back to Python, we almost always want to
@@ -1625,9 +1569,8 @@ template struct return_value_policy_ov
template struct return_value_policy_override>::value, void>> {
static return_value_policy policy(return_value_policy p) {
- return !std::is_lvalue_reference::value &&
- !std::is_pointer::value
- ? return_value_policy::move : p;
+ return !std::is_lvalue_reference::value && !std::is_pointer::value
+ ? return_value_policy::move : p;
}
};
@@ -1855,7 +1798,7 @@ struct function_record;
/// Internal data associated with a single function call
struct function_call {
- function_call(const function_record &f, handle p); // Implementation in attr.h
+ function_call(function_record &f, handle p); // Implementation in attr.h
/// The function data:
const function_record &func;
@@ -1897,7 +1840,7 @@ class argument_loader {
static constexpr bool has_kwargs = kwargs_pos < 0;
static constexpr bool has_args = args_pos < 0;
- static constexpr auto arg_names = concat(type_descr(make_caster::name)...);
+ static PYBIND11_DESCR arg_names() { return detail::concat(make_caster::name()...); }
bool load_args(function_call &call) {
return load_impl_sequence(call, indices{});
@@ -2116,13 +2059,9 @@ object object_api::call(Args &&...args) const {
NAMESPACE_END(detail)
-#define PYBIND11_MAKE_OPAQUE(...) \
+#define PYBIND11_MAKE_OPAQUE(Type) \
namespace pybind11 { namespace detail { \
- template<> class type_caster<__VA_ARGS__> : public type_caster_base<__VA_ARGS__> { }; \
+ template<> class type_caster : public type_caster_base { }; \
}}
-/// Lets you pass a type containing a `,` through a macro parameter without needing a separate
-/// typedef, e.g.: `PYBIND11_OVERLOAD(PYBIND11_TYPE(ReturnType), PYBIND11_TYPE(Parent), f, arg)`
-#define PYBIND11_TYPE(...) __VA_ARGS__
-
NAMESPACE_END(PYBIND11_NAMESPACE)
diff --git a/vnpy/api/tap/vntap/include/pybind11/chrono.h b/vnpy/api/tap/include/pybind11/chrono.h
similarity index 100%
rename from vnpy/api/tap/vntap/include/pybind11/chrono.h
rename to vnpy/api/tap/include/pybind11/chrono.h
diff --git a/vnpy/api/tap/vntap/include/pybind11/common.h b/vnpy/api/tap/include/pybind11/common.h
similarity index 100%
rename from vnpy/api/tap/vntap/include/pybind11/common.h
rename to vnpy/api/tap/include/pybind11/common.h
diff --git a/vnpy/api/tap/vntap/include/pybind11/complex.h b/vnpy/api/tap/include/pybind11/complex.h
similarity index 98%
rename from vnpy/api/tap/vntap/include/pybind11/complex.h
rename to vnpy/api/tap/include/pybind11/complex.h
index 3f89638571..5dac27cc4e 100644
--- a/vnpy/api/tap/vntap/include/pybind11/complex.h
+++ b/vnpy/api/tap/include/pybind11/complex.h
@@ -25,13 +25,9 @@ template struct format_descriptor, detail::enable_i
static std::string format() { return std::string(value); }
};
-#ifndef PYBIND11_CPP17
-
template constexpr const char format_descriptor<
std::complex, detail::enable_if_t::value>>::value[3];
-#endif
-
NAMESPACE_BEGIN(detail)
template struct is_fmt_numeric, detail::enable_if_t::value>> {
diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/class.h b/vnpy/api/tap/include/pybind11/detail/class.h
similarity index 99%
rename from vnpy/api/tap/vntap/include/pybind11/detail/class.h
rename to vnpy/api/tap/include/pybind11/detail/class.h
index 7a5dd0130d..ff06370fa0 100644
--- a/vnpy/api/tap/vntap/include/pybind11/detail/class.h
+++ b/vnpy/api/tap/include/pybind11/detail/class.h
@@ -289,9 +289,13 @@ extern "C" inline int pybind11_object_init(PyObject *self, PyObject *, PyObject
inline void add_patient(PyObject *nurse, PyObject *patient) {
auto &internals = get_internals();
auto instance = reinterpret_cast(nurse);
+ auto ¤t_patients = internals.patients[nurse];
instance->has_patients = true;
+ for (auto &p : current_patients)
+ if (p == patient)
+ return;
Py_INCREF(patient);
- internals.patients[nurse].push_back(patient);
+ current_patients.push_back(patient);
}
inline void clear_patients(PyObject *self) {
diff --git a/vnpy/api/tap/vntap/include/pybind11/detail/common.h b/vnpy/api/tap/include/pybind11/detail/common.h
similarity index 93%
rename from vnpy/api/tap/vntap/include/pybind11/detail/common.h
rename to vnpy/api/tap/include/pybind11/detail/common.h
index 5ff74856b1..892de0f8fd 100644
--- a/vnpy/api/tap/vntap/include/pybind11/detail/common.h
+++ b/vnpy/api/tap/include/pybind11/detail/common.h
@@ -93,8 +93,8 @@
#endif
#define PYBIND11_VERSION_MAJOR 2
-#define PYBIND11_VERSION_MINOR 3
-#define PYBIND11_VERSION_PATCH dev0
+#define PYBIND11_VERSION_MINOR 2
+#define PYBIND11_VERSION_PATCH 4
/// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode
#if defined(_MSC_VER)
@@ -159,8 +159,6 @@
#define PYBIND11_BYTES_SIZE PyBytes_Size
#define PYBIND11_LONG_CHECK(o) PyLong_Check(o)
#define PYBIND11_LONG_AS_LONGLONG(o) PyLong_AsLongLong(o)
-#define PYBIND11_LONG_FROM_SIGNED(o) PyLong_FromSsize_t((ssize_t) o)
-#define PYBIND11_LONG_FROM_UNSIGNED(o) PyLong_FromSize_t((size_t) o)
#define PYBIND11_BYTES_NAME "bytes"
#define PYBIND11_STRING_NAME "str"
#define PYBIND11_SLICE_OBJECT PyObject
@@ -183,8 +181,6 @@
#define PYBIND11_BYTES_SIZE PyString_Size
#define PYBIND11_LONG_CHECK(o) (PyInt_Check(o) || PyLong_Check(o))
#define PYBIND11_LONG_AS_LONGLONG(o) (PyInt_Check(o) ? (long long) PyLong_AsLong(o) : PyLong_AsLongLong(o))
-#define PYBIND11_LONG_FROM_SIGNED(o) PyInt_FromSsize_t((ssize_t) o) // Returns long if needed.
-#define PYBIND11_LONG_FROM_UNSIGNED(o) PyInt_FromSize_t((size_t) o) // Returns long if needed.
#define PYBIND11_BYTES_NAME "str"
#define PYBIND11_STRING_NAME "unicode"
#define PYBIND11_SLICE_OBJECT PySliceObject
@@ -212,31 +208,6 @@ extern "C" {
#define PYBIND11_TOSTRING(x) PYBIND11_STRINGIFY(x)
#define PYBIND11_CONCAT(first, second) first##second
-#define PYBIND11_CHECK_PYTHON_VERSION \
- { \
- const char *compiled_ver = PYBIND11_TOSTRING(PY_MAJOR_VERSION) \
- "." PYBIND11_TOSTRING(PY_MINOR_VERSION); \
- const char *runtime_ver = Py_GetVersion(); \
- size_t len = std::strlen(compiled_ver); \
- if (std::strncmp(runtime_ver, compiled_ver, len) != 0 \
- || (runtime_ver[len] >= '0' && runtime_ver[len] <= '9')) { \
- PyErr_Format(PyExc_ImportError, \
- "Python version mismatch: module was compiled for Python %s, " \
- "but the interpreter version is incompatible: %s.", \
- compiled_ver, runtime_ver); \
- return nullptr; \
- } \
- }
-
-#define PYBIND11_CATCH_INIT_EXCEPTIONS \
- catch (pybind11::error_already_set &e) { \
- PyErr_SetString(PyExc_ImportError, e.what()); \
- return nullptr; \
- } catch (const std::exception &e) { \
- PyErr_SetString(PyExc_ImportError, e.what()); \
- return nullptr; \
- } \
-
/** \rst
***Deprecated in favor of PYBIND11_MODULE***
@@ -256,10 +227,27 @@ extern "C" {
PYBIND11_DEPRECATED("PYBIND11_PLUGIN is deprecated, use PYBIND11_MODULE") \
static PyObject *pybind11_init(); \
PYBIND11_PLUGIN_IMPL(name) { \
- PYBIND11_CHECK_PYTHON_VERSION \
+ int major, minor; \
+ if (sscanf(Py_GetVersion(), "%i.%i", &major, &minor) != 2) { \
+ PyErr_SetString(PyExc_ImportError, "Can't parse Python version."); \
+ return nullptr; \
+ } else if (major != PY_MAJOR_VERSION || minor != PY_MINOR_VERSION) { \
+ PyErr_Format(PyExc_ImportError, \
+ "Python version mismatch: module was compiled for " \
+ "version %i.%i, while the interpreter is running " \
+ "version %i.%i.", PY_MAJOR_VERSION, PY_MINOR_VERSION, \
+ major, minor); \
+ return nullptr; \
+ } \
try { \
return pybind11_init(); \
- } PYBIND11_CATCH_INIT_EXCEPTIONS \
+ } catch (pybind11::error_already_set &e) { \
+ PyErr_SetString(PyExc_ImportError, e.what()); \
+ return nullptr; \
+ } catch (const std::exception &e) { \
+ PyErr_SetString(PyExc_ImportError, e.what()); \
+ return nullptr; \
+ } \
} \
PyObject *pybind11_init()
@@ -283,12 +271,29 @@ extern "C" {
#define PYBIND11_MODULE(name, variable) \
static void PYBIND11_CONCAT(pybind11_init_, name)(pybind11::module &); \
PYBIND11_PLUGIN_IMPL(name) { \
- PYBIND11_CHECK_PYTHON_VERSION \
+ int major, minor; \
+ if (sscanf(Py_GetVersion(), "%i.%i", &major, &minor) != 2) { \
+ PyErr_SetString(PyExc_ImportError, "Can't parse Python version."); \
+ return nullptr; \
+ } else if (major != PY_MAJOR_VERSION || minor != PY_MINOR_VERSION) { \
+ PyErr_Format(PyExc_ImportError, \
+ "Python version mismatch: module was compiled for " \
+ "version %i.%i, while the interpreter is running " \
+ "version %i.%i.", PY_MAJOR_VERSION, PY_MINOR_VERSION, \
+ major, minor); \
+ return nullptr; \
+ } \
auto m = pybind11::module(PYBIND11_TOSTRING(name)); \
try { \
PYBIND11_CONCAT(pybind11_init_, name)(m); \
return m.ptr(); \
- } PYBIND11_CATCH_INIT_EXCEPTIONS \
+ } catch (pybind11::error_already_set &e) { \
+ PyErr_SetString(PyExc_ImportError, e.what()); \
+ return nullptr; \
+ } catch (const std::exception &e) { \
+ PyErr_SetString(PyExc_ImportError, e.what()); \
+ return nullptr; \
+ } \
} \
void PYBIND11_CONCAT(pybind11_init_, name)(pybind11::module &variable)
@@ -386,7 +391,7 @@ struct instance {
void *simple_value_holder[1 + instance_simple_holder_in_ptrs()];
nonsimple_values_and_holders nonsimple;
};
- /// Weak references
+ /// Weak references (needed for keep alive):
PyObject *weakrefs;
/// If true, the pointer is owned which means we're free to manage it with a holder.
bool owned : 1;
@@ -403,10 +408,10 @@ struct instance {
* (which is typically the size of two pointers), or when multiple inheritance is used on the
* python side. Non-simple layout allocates the required amount of memory to have multiple
* bound C++ classes as parents. Under this layout, `nonsimple.values_and_holders` is set to a
- * pointer to allocated space of the required space to hold a sequence of value pointers and
+ * pointer to allocated space of the required space to hold a a sequence of value pointers and
* holders followed `status`, a set of bit flags (1 byte each), i.e.
* [val1*][holder1][val2*][holder2]...[bb...] where each [block] is rounded up to a multiple of
- * `sizeof(void *)`. `nonsimple.status` is, for convenience, a pointer to the
+ * `sizeof(void *)`. `nonsimple.holder_constructed` is, for convenience, a pointer to the
* beginning of the [bb...] block (but not independently allocated).
*
* Status bits indicate whether the associated holder is constructed (&
@@ -579,11 +584,6 @@ template using deferred_t = typename deferred_type<
template using is_strict_base_of = bool_constant<
std::is_base_of::value && !std::is_same::value>;
-/// Like is_base_of, but also requires that the base type is accessible (i.e. that a Derived pointer
-/// can be converted to a Base pointer)
-template using is_accessible_base_of = bool_constant<
- std::is_base_of::value && std::is_convertible::value>;
-
template class Base>
struct is_template_base_of_impl {
template static std::true_type check(Base *);
@@ -702,13 +702,9 @@ template struct format_descriptor constexpr const char format_descriptor<
T, detail::enable_if_t::value>>::value[2];
-#endif
-
/// RAII wrapper that temporarily clears any Python error state
struct error_scope {
PyObject *type, *value, *trace;
diff --git a/vnpy/api/tap/include/pybind11/detail/descr.h b/vnpy/api/tap/include/pybind11/detail/descr.h
new file mode 100644
index 0000000000..e3bf2ba978
--- /dev/null
+++ b/vnpy/api/tap/include/pybind11/detail/descr.h
@@ -0,0 +1,185 @@
+/*
+ pybind11/detail/descr.h: Helper type for concatenating type signatures
+ either at runtime (C++11) or compile time (C++14)
+
+ Copyright (c) 2016 Wenzel Jakob
+
+ All rights reserved. Use of this source code is governed by a
+ BSD-style license that can be found in the LICENSE file.
+*/
+
+#pragma once
+
+#include "common.h"
+
+NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
+NAMESPACE_BEGIN(detail)
+
+/* Concatenate type signatures at compile time using C++14 */
+#if defined(PYBIND11_CPP14) && !defined(_MSC_VER)
+#define PYBIND11_CONSTEXPR_DESCR
+
+template class descr {
+ template friend class descr;
+public:
+ constexpr descr(char const (&text) [Size1+1], const std::type_info * const (&types)[Size2+1])
+ : descr(text, types,
+ make_index_sequence(),
+ make_index_sequence()) { }
+
+ constexpr const char *text() const { return m_text; }
+ constexpr const std::type_info * const * types() const { return m_types; }
+
+ template
+ constexpr descr operator+(const descr &other) const {
+ return concat(other,
+ make_index_sequence(),
+ make_index_sequence(),
+ make_index_sequence(),
+ make_index_sequence());
+ }
+
+protected:
+ template
+ constexpr descr(
+ char const (&text) [Size1+1],
+ const std::type_info * const (&types) [Size2+1],
+ index_sequence, index_sequence)
+ : m_text{text[Indices1]..., '\0'},
+ m_types{types[Indices2]..., nullptr } {}
+
+ template
+ constexpr descr
+ concat(const descr &other,
+ index_sequence, index_sequence,
+ index_sequence, index_sequence) const {
+ return descr(
+ { m_text[Indices1]..., other.m_text[OtherIndices1]..., '\0' },
+ { m_types[Indices2]..., other.m_types[OtherIndices2]..., nullptr }
+ );
+ }
+
+protected:
+ char m_text[Size1 + 1];
+ const std::type_info * m_types[Size2 + 1];
+};
+
+template constexpr descr _(char const(&text)[Size]) {
+ return descr(text, { nullptr });
+}
+
+template struct int_to_str : int_to_str { };
+template struct int_to_str<0, Digits...> {
+ static constexpr auto digits = descr({ ('0' + Digits)..., '\0' }, { nullptr });
+};
+
+// Ternary description (like std::conditional)
+template
+constexpr enable_if_t> _(char const(&text1)[Size1], char const(&)[Size2]) {
+ return _(text1);
+}
+template
+constexpr enable_if_t> _(char const(&)[Size1], char const(&text2)[Size2]) {
+ return _(text2);
+}
+template
+constexpr enable_if_t> _(descr d, descr) { return d; }
+template
+constexpr enable_if_t> _(descr, descr d) { return d; }
+
+template auto constexpr _() -> decltype(int_to_str::digits) {
+ return int_to_str::digits;
+}
+
+template constexpr descr<1, 1> _() {
+ return descr<1, 1>({ '%', '\0' }, { &typeid(Type), nullptr });
+}
+
+inline constexpr descr<0, 0> concat() { return _(""); }
+template auto constexpr concat(descr descr) { return descr; }
+template auto constexpr concat(descr descr, Args&&... args) { return descr + _(", ") + concat(args...); }
+template auto constexpr type_descr(descr descr) { return _("{") + descr + _("}"); }
+
+#define PYBIND11_DESCR constexpr auto
+
+#else /* Simpler C++11 implementation based on run-time memory allocation and copying */
+
+class descr {
+public:
+ PYBIND11_NOINLINE descr(const char *text, const std::type_info * const * types) {
+ size_t nChars = len(text), nTypes = len(types);
+ m_text = new char[nChars];
+ m_types = new const std::type_info *[nTypes];
+ memcpy(m_text, text, nChars * sizeof(char));
+ memcpy(m_types, types, nTypes * sizeof(const std::type_info *));
+ }
+
+ PYBIND11_NOINLINE descr operator+(descr &&d2) && {
+ descr r;
+
+ size_t nChars1 = len(m_text), nTypes1 = len(m_types);
+ size_t nChars2 = len(d2.m_text), nTypes2 = len(d2.m_types);
+
+ r.m_text = new char[nChars1 + nChars2 - 1];
+ r.m_types = new const std::type_info *[nTypes1 + nTypes2 - 1];
+ memcpy(r.m_text, m_text, (nChars1-1) * sizeof(char));
+ memcpy(r.m_text + nChars1 - 1, d2.m_text, nChars2 * sizeof(char));
+ memcpy(r.m_types, m_types, (nTypes1-1) * sizeof(std::type_info *));
+ memcpy(r.m_types + nTypes1 - 1, d2.m_types, nTypes2 * sizeof(std::type_info *));
+
+ delete[] m_text; delete[] m_types;
+ delete[] d2.m_text; delete[] d2.m_types;
+
+ return r;
+ }
+
+ char *text() { return m_text; }
+ const std::type_info * * types() { return m_types; }
+
+protected:
+ PYBIND11_NOINLINE descr() { }
+
+ template static size_t len(const T *ptr) { // return length including null termination
+ const T *it = ptr;
+ while (*it++ != (T) 0)
+ ;
+ return static_cast(it - ptr);
+ }
+
+ const std::type_info **m_types = nullptr;
+ char *m_text = nullptr;
+};
+
+/* The 'PYBIND11_NOINLINE inline' combinations below are intentional to get the desired linkage while producing as little object code as possible */
+
+PYBIND11_NOINLINE inline descr _(const char *text) {
+ const std::type_info *types[1] = { nullptr };
+ return descr(text, types);
+}
+
+template PYBIND11_NOINLINE enable_if_t _(const char *text1, const char *) { return _(text1); }
+template PYBIND11_NOINLINE enable_if_t _(char const *, const char *text2) { return _(text2); }
+template PYBIND11_NOINLINE enable_if_t _(descr d, descr) { return d; }
+template PYBIND11_NOINLINE enable_if_t _(descr, descr d) { return d; }
+
+template