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
5318cc02
Commit
5318cc02
authored
10 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
py: Tidy up a few function declarations.
parent
7eb2317f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
py/obj.h
+2
-3
2 additions, 3 deletions
py/obj.h
py/unicode.c
+2
-1
2 additions, 1 deletion
py/unicode.c
with
4 additions
and
4 deletions
py/obj.h
+
2
−
3
View file @
5318cc02
...
...
@@ -395,6 +395,8 @@ mp_obj_t mp_obj_new_int_from_ll(long long val); // this must return a multi-prec
mp_obj_t
mp_obj_new_int_from_ull
(
unsigned
long
long
val
);
// this must return a multi-precision integer object (or raise an overflow exception)
mp_obj_t
mp_obj_new_str
(
const
char
*
data
,
mp_uint_t
len
,
bool
make_qstr_if_not_already
);
mp_obj_t
mp_obj_new_bytes
(
const
byte
*
data
,
mp_uint_t
len
);
mp_obj_t
mp_obj_new_bytearray
(
mp_uint_t
n
,
void
*
items
);
mp_obj_t
mp_obj_new_bytearray_by_ref
(
mp_uint_t
n
,
void
*
items
);
#if MICROPY_PY_BUILTINS_FLOAT
mp_obj_t
mp_obj_new_float
(
mp_float_t
val
);
mp_obj_t
mp_obj_new_complex
(
mp_float_t
real
,
mp_float_t
imag
);
...
...
@@ -549,9 +551,6 @@ void mp_obj_set_store(mp_obj_t self_in, mp_obj_t item);
// slice
void
mp_obj_slice_get
(
mp_obj_t
self_in
,
mp_obj_t
*
start
,
mp_obj_t
*
stop
,
mp_obj_t
*
step
);
// array
mp_obj_t
mp_obj_new_bytearray_by_ref
(
mp_uint_t
n
,
void
*
items
);
// functions
#define MP_OBJ_FUN_ARGS_MAX (0xffff) // to set maximum value in n_args_max below
typedef
struct
_mp_obj_fun_builtin_t
{
// use this to make const objects that go in ROM
...
...
This diff is collapsed.
Click to expand it.
py/unicode.c
+
2
−
1
View file @
5318cc02
...
...
@@ -28,6 +28,7 @@
#include
"mpconfig.h"
#include
"misc.h"
#include
"unicode.h"
// attribute flags
#define FL_PRINT (0x01)
...
...
@@ -96,7 +97,7 @@ const byte *utf8_next_char(const byte *s) {
#endif
}
mp_uint_t
utf8_ptr_to_index
(
const
char
*
s
,
const
char
*
ptr
)
{
mp_uint_t
utf8_ptr_to_index
(
const
byte
*
s
,
const
byte
*
ptr
)
{
mp_uint_t
i
=
0
;
while
(
ptr
>
s
)
{
if
(
!
UTF8_IS_CONT
(
*--
ptr
))
{
...
...
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