Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.blitz
Commits
af86be99
Commit
af86be99
authored
May 20, 2015
by
Manuel Günther
Browse files
Removed duplicated constants from c module
parent
ad046389
Changes
3
Hide whitespace changes
Inline
Side-by-side
bob/blitz/__init__.py
View file @
af86be99
...
...
@@ -3,8 +3,6 @@
# Andre Anjos <andre.anjos@idiap.ch>
# Fri 20 Sep 14:45:01 2013
import
pkg_resources
from
._library
import
array
,
as_blitz
from
.
import
version
from
.version
import
module
as
__version__
...
...
bob/blitz/main.cpp
View file @
af86be99
...
...
@@ -79,12 +79,6 @@ static PyObject* create_module (void) {
if
(
!
m
)
return
0
;
auto
m_
=
make_safe
(
m
);
///< protects against early returns
/* register version numbers and constants */
if
(
PyModule_AddIntConstant
(
m
,
"__api_version__"
,
BOB_BLITZ_API_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
m
,
"__version__"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
/* register the type object to python */
if
(
!
init_BlitzArray
(
m
))
return
NULL
;
...
...
@@ -158,7 +152,6 @@ static PyObject* create_module (void) {
import_array1
(
0
);
return
Py_BuildValue
(
"O"
,
m
);
}
PyMODINIT_FUNC
BOB_EXT_ENTRY_NAME
(
void
)
{
...
...
bob/blitz/version.cpp
View file @
af86be99
...
...
@@ -132,19 +132,15 @@ static PyObject* create_module (void) {
auto
m_
=
make_safe
(
m
);
///< protects against early returns
/* register version numbers and constants */
if
(
PyModule_AddIntConstant
(
m
,
"api"
,
BOB_BLITZ_API_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
m
,
"module"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddIntConstant
(
m
,
"api"
,
BOB_BLITZ_API_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
m
,
"module"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
PyObject
*
externals
=
build_version_dictionary
();
if
(
!
externals
)
return
0
;
if
(
PyModule_AddObject
(
m
,
"externals"
,
externals
)
<
0
)
return
0
;
if
(
import_bob_blitz
()
<
0
)
return
0
;
Py_INCREF
(
m
);
return
m
;
return
Py_BuildValue
(
"O"
,
m
);
}
PyMODINIT_FUNC
BOB_EXT_ENTRY_NAME
(
void
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment