Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagesmc
Path: blob/master/src/c_lib/include/ZZ_pylong.h
8815 views
1
/*****************************************************************************
2
# Copyright (C) 2007 William Stein <[email protected]>
3
#
4
# Distributed under the terms of the GNU General Public License (GPL) as
5
# published by the Free Software Foundation; either version 2 of the
6
# License, or (at your option) any later version.
7
#
8
# This code is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
# General Public License for more details.
12
#
13
# The full text of the GPL is available at:
14
#
15
# http://www.gnu.org/licenses/
16
#*****************************************************************************/
17
18
/* Author: Joel B. Mohler <[email protected]> (2007-06-17) */
19
20
#ifndef ZZ_PYLONG_H
21
#define ZZ_PYLONG_H
22
23
/* Yes, this is kind of weird. I'm only wrapping this for C++ */
24
#ifdef __cplusplus
25
26
#include <Python.h>
27
#include <NTL/ZZ.h>
28
using namespace NTL;
29
#include "gmp.h"
30
31
/* ZZ -> pylong conversion */
32
PyObject * ZZ_get_pylong(ZZ &z);
33
34
/* pylong -> ZZ conversion */
35
int ZZ_set_pylong(ZZ &z, PyObject * ll);
36
#endif
37
38
#endif
39
40