Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/c_lib/include/ZZ_pylong.h
4057 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]>
19
2007-06-17 */
20
21
#ifndef ZZ_PYLONG_H
22
#define ZZ_PYLONG_H
23
24
/* Yes, this is kind of weird. I'm only wrapping this for C++ */
25
#ifdef __cplusplus
26
27
#include <Python.h>
28
#include <NTL/ZZ.h>
29
using namespace NTL;
30
#include "gmp.h"
31
32
/* ZZ -> pylong conversion */
33
PyObject * ZZ_get_pylong(ZZ &z);
34
35
/* pylong -> ZZ conversion */
36
int ZZ_set_pylong(ZZ &z, PyObject * ll);
37
#endif
38
39
#endif
40
41