Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
848dd0e7
Commit
848dd0e7
authored
10 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Make some mpz functions static and remove unused ones.
parent
04749e67
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/mpz.c
+6
-2
6 additions, 2 deletions
py/mpz.c
py/mpz.h
+0
-11
0 additions, 11 deletions
py/mpz.h
with
6 additions
and
13 deletions
py/mpz.c
+
6
−
2
View file @
848dd0e7
...
...
@@ -572,6 +572,9 @@ void mpz_deinit(mpz_t *z) {
}
}
#if 0
these functions are unused
mpz_t *mpz_zero(void) {
mpz_t *z = m_new_obj(mpz_t);
mpz_init_zero(z);
...
...
@@ -603,8 +606,9 @@ mpz_t *mpz_from_str(const char *str, mp_uint_t len, bool neg, mp_uint_t base) {
mpz_set_from_str(z, str, len, neg, base);
return z;
}
#endif
void
mpz_free
(
mpz_t
*
z
)
{
STATIC
void
mpz_free
(
mpz_t
*
z
)
{
if
(
z
!=
NULL
)
{
m_del
(
mpz_dig_t
,
z
->
dig
,
z
->
alloc
);
m_del_obj
(
mpz_t
,
z
);
...
...
@@ -627,7 +631,7 @@ STATIC void mpz_need_dig(mpz_t *z, mp_uint_t need) {
}
}
mpz_t
*
mpz_clone
(
const
mpz_t
*
src
)
{
STATIC
mpz_t
*
mpz_clone
(
const
mpz_t
*
src
)
{
mpz_t
*
z
=
m_new_obj
(
mpz_t
);
z
->
neg
=
src
->
neg
;
z
->
fixed_dig
=
0
;
...
...
This diff is collapsed.
Click to expand it.
py/mpz.h
+
0
−
11
View file @
848dd0e7
...
...
@@ -82,17 +82,6 @@ void mpz_init_from_int(mpz_t *z, mp_int_t val);
void
mpz_init_fixed_from_int
(
mpz_t
*
z
,
mpz_dig_t
*
dig
,
mp_uint_t
dig_alloc
,
mp_int_t
val
);
void
mpz_deinit
(
mpz_t
*
z
);
mpz_t
*
mpz_zero
(
void
);
mpz_t
*
mpz_from_int
(
mp_int_t
i
);
mpz_t
*
mpz_from_ll
(
long
long
i
,
bool
is_signed
);
#if MICROPY_PY_BUILTINS_FLOAT
mpz_t
*
mpz_from_float
(
mp_float_t
i
);
#endif
mpz_t
*
mpz_from_str
(
const
char
*
str
,
mp_uint_t
len
,
bool
neg
,
mp_uint_t
base
);
void
mpz_free
(
mpz_t
*
z
);
mpz_t
*
mpz_clone
(
const
mpz_t
*
src
);
void
mpz_set
(
mpz_t
*
dest
,
const
mpz_t
*
src
);
void
mpz_set_from_int
(
mpz_t
*
z
,
mp_int_t
src
);
void
mpz_set_from_ll
(
mpz_t
*
z
,
long
long
i
,
bool
is_signed
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment