all: Format code to add space after C++-style comment start.
Note: the uncrustify configuration is explicitly set to 'add' instead of 'force' in order not to alter the comments which use extra spaces after // as a means of indenting text for clarity.
This commit is contained in:
@@ -165,7 +165,7 @@ MP_NOINLINE void gc_collect_regs_and_stack(void) {
|
||||
}
|
||||
|
||||
void gc_collect(void) {
|
||||
//gc_dump_info();
|
||||
// gc_dump_info();
|
||||
|
||||
gc_collect_start();
|
||||
gc_collect_regs_and_stack();
|
||||
@@ -177,8 +177,8 @@ void gc_collect(void) {
|
||||
#endif
|
||||
gc_collect_end();
|
||||
|
||||
//printf("-----\n");
|
||||
//gc_dump_info();
|
||||
// printf("-----\n");
|
||||
// gc_dump_info();
|
||||
}
|
||||
|
||||
#endif //MICROPY_ENABLE_GC
|
||||
#endif // MICROPY_ENABLE_GC
|
||||
|
||||
@@ -699,7 +699,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
|
||||
free(heap);
|
||||
#endif
|
||||
|
||||
//printf("total bytes = %d\n", m_get_total_bytes_allocated());
|
||||
// printf("total bytes = %d\n", m_get_total_bytes_allocated());
|
||||
return ret & 0xff;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ typedef struct _mp_obj_fficallback_t {
|
||||
ffi_type *params[];
|
||||
} mp_obj_fficallback_t;
|
||||
|
||||
//STATIC const mp_obj_type_t opaque_type;
|
||||
// STATIC const mp_obj_type_t opaque_type;
|
||||
STATIC const mp_obj_type_t ffimod_type;
|
||||
STATIC const mp_obj_type_t ffifunc_type;
|
||||
STATIC const mp_obj_type_t fficallback_type;
|
||||
|
||||
@@ -98,7 +98,7 @@ STATIC bool is_object_type(const char *jtypesig) {
|
||||
STATIC void check_exception(void) {
|
||||
jobject exc = JJ1(ExceptionOccurred);
|
||||
if (exc) {
|
||||
//JJ1(ExceptionDescribe);
|
||||
// JJ1(ExceptionDescribe);
|
||||
mp_obj_t py_e = new_jobject(exc);
|
||||
JJ1(ExceptionClear);
|
||||
if (JJ(IsInstanceOf, exc, IndexException_class)) {
|
||||
@@ -142,7 +142,7 @@ STATIC void jclass_attr(mp_obj_t self_in, qstr attr_in, mp_obj_t *dest) {
|
||||
dest[0] = new_jobject(obj);
|
||||
return;
|
||||
}
|
||||
//JJ1(ExceptionDescribe);
|
||||
// JJ1(ExceptionDescribe);
|
||||
JJ1(ExceptionClear);
|
||||
|
||||
mp_obj_jmethod_t *o = m_new_obj(mp_obj_jmethod_t);
|
||||
@@ -220,7 +220,7 @@ STATIC void jobject_attr(mp_obj_t self_in, qstr attr_in, mp_obj_t *dest) {
|
||||
dest[0] = new_jobject(obj);
|
||||
return;
|
||||
}
|
||||
//JJ1(ExceptionDescribe);
|
||||
// JJ1(ExceptionDescribe);
|
||||
JJ1(ExceptionClear);
|
||||
|
||||
mp_obj_jmethod_t *o = m_new_obj(mp_obj_jmethod_t);
|
||||
@@ -246,7 +246,7 @@ STATIC mp_obj_t jobject_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value)
|
||||
mp_uint_t idx = mp_obj_get_int(index);
|
||||
char class_name[64];
|
||||
get_jclass_name(self->obj, class_name);
|
||||
//printf("class: %s\n", class_name);
|
||||
// printf("class: %s\n", class_name);
|
||||
|
||||
if (class_name[0] == '[') {
|
||||
if (class_name[1] == 'L' || class_name[1] == '[') {
|
||||
@@ -412,7 +412,7 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
|
||||
if (!MATCH(expected_type, "java.lang.Object")) {
|
||||
char class_name[64];
|
||||
get_jclass_name(jo->obj, class_name);
|
||||
//printf("Arg class: %s\n", class_name);
|
||||
// printf("Arg class: %s\n", class_name);
|
||||
if (strcmp(class_name, expected_type) != 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
|
||||
return false;
|
||||
}
|
||||
} else if (arg == mp_const_none) {
|
||||
//printf("TODO: Check java arg type!!\n");
|
||||
// printf("TODO: Check java arg type!!\n");
|
||||
while (isalpha(*arg_type) || *arg_type == '.') {
|
||||
arg_type++;
|
||||
}
|
||||
@@ -470,7 +470,7 @@ STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool
|
||||
jobject name_o = JJ(CallObjectMethod, meth, Object_toString_mid);
|
||||
const char *decl = JJ(GetStringUTFChars, name_o, NULL);
|
||||
const char *arg_types = strchr(decl, '(') + 1;
|
||||
//const char *arg_types_end = strchr(arg_types, ')');
|
||||
// const char *arg_types_end = strchr(arg_types, ')');
|
||||
// printf("method[%d]=%p %s\n", i, meth, decl);
|
||||
|
||||
const char *meth_name = NULL;
|
||||
|
||||
@@ -110,7 +110,7 @@ STATIC mp_obj_t mod_time_sleep(mp_obj_t arg) {
|
||||
break;
|
||||
}
|
||||
mp_handle_pending(true);
|
||||
//printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec);
|
||||
// printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec);
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -211,7 +211,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_listen_obj, socket_listen);
|
||||
STATIC mp_obj_t socket_accept(mp_obj_t self_in) {
|
||||
mp_obj_socket_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
// sockaddr_storage isn't stack-friendly (129 bytes or so)
|
||||
//struct sockaddr_storage addr;
|
||||
// struct sockaddr_storage addr;
|
||||
byte addr[32];
|
||||
socklen_t addr_len = sizeof(addr);
|
||||
int fd;
|
||||
@@ -547,7 +547,7 @@ STATIC mp_obj_t mod_socket_getaddrinfo(size_t n_args, const mp_obj_t *args) {
|
||||
#ifdef __UCLIBC_MAJOR__
|
||||
#if __UCLIBC_MAJOR__ == 0 && (__UCLIBC_MINOR__ < 9 || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32))
|
||||
// "warning" requires -Wno-cpp which is a relatively new gcc option, so we choose not to use it.
|
||||
//#warning Working around uClibc bug with numeric service name
|
||||
// #warning Working around uClibc bug with numeric service name
|
||||
// Older versions og uClibc have bugs when numeric ports in service
|
||||
// arg require also hints.ai_socktype (or hints.ai_protocol) != 0
|
||||
// This actually was fixed in 0.9.32.1, but uClibc doesn't allow to
|
||||
|
||||
@@ -93,7 +93,7 @@ STATIC void mp_thread_gc(int signo, siginfo_t *info, void *context) {
|
||||
// We have access to the context (regs, stack) of the thread but it seems
|
||||
// that we don't need the extra information, enough is captured by the
|
||||
// gc_collect_regs_and_stack function above
|
||||
//gc_collect_root((void**)context, sizeof(ucontext_t) / sizeof(uintptr_t));
|
||||
// gc_collect_root((void**)context, sizeof(ucontext_t) / sizeof(uintptr_t));
|
||||
#if MICROPY_ENABLE_PYSTACK
|
||||
void **ptrs = (void **)(void *)MP_STATE_THREAD(pystack_start);
|
||||
gc_collect_root(ptrs, (MP_STATE_THREAD(pystack_cur) - MP_STATE_THREAD(pystack_start)) / sizeof(void *));
|
||||
|
||||
Reference in New Issue
Block a user