Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mypyc/lib-rt/byteswriter_extra_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include "byteswriter_extra_ops.h"

#ifdef MYPYC_EXPERIMENTAL

char CPyBytesWriter_Write(PyObject *obj, PyObject *value) {
BytesWriterObject *self = (BytesWriterObject *)obj;
const char *data;
Expand All @@ -29,3 +31,5 @@ char CPyBytesWriter_Write(PyObject *obj, PyObject *value) {
self->len += size;
return CPY_NONE;
}

#endif // MYPYC_EXPERIMENTAL
7 changes: 7 additions & 0 deletions mypyc/lib-rt/byteswriter_extra_ops.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#ifndef BYTESWRITER_EXTRA_OPS_H
#define BYTESWRITER_EXTRA_OPS_H

#ifdef MYPYC_EXPERIMENTAL

#include <stdint.h>
#include <Python.h>

#include "librt_strings.h"

static inline CPyTagged
Expand Down Expand Up @@ -31,4 +36,6 @@ CPyBytesWriter_Append(PyObject *obj, uint8_t value) {

char CPyBytesWriter_Write(PyObject *obj, PyObject *value);

#endif // MYPYC_EXPERIMENTAL

#endif
1 change: 0 additions & 1 deletion mypyc/lib-rt/function_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ static PyObject* CPyFunction_repr(CPyFunction *op) {
}

static PyObject* CPyFunction_call(PyObject *func, PyObject *args, PyObject *kw) {
PyObject *result;
CPyFunction *f = (CPyFunction *)func;
vectorcallfunc vc = CPyFunction_func_vectorcall(f);
assert(vc);
Expand Down
1 change: 0 additions & 1 deletion mypyc/lib-rt/getargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,6 @@ static void
skipitem(const char **p_format, va_list *p_va)
{
const char *format = *p_format;
char c = *format++;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes behavior -- switch to format++;?


if (p_va != NULL) {
(void) va_arg(*p_va, PyObject **);
Expand Down
2 changes: 2 additions & 0 deletions mypyc/lib-rt/librt_base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import_librt_base64(void)

#else // MYPYC_EXPERIMENTAL

#include <Python.h>

#define LIBRT_BASE64_ABI_VERSION 1
#define LIBRT_BASE64_API_VERSION 2
#define LIBRT_BASE64_API_LEN 4
Expand Down
2 changes: 2 additions & 0 deletions mypyc/lib-rt/librt_internal.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef LIBRT_INTERNAL_H
#define LIBRT_INTERNAL_H

#include <Python.h>

// ABI version -- only an exact match is compatible. This will only be changed in
// very exceptional cases (likely never) due to strict backward compatibility
// requirements.
Expand Down
2 changes: 2 additions & 0 deletions mypyc/lib-rt/librt_strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import_librt_strings(void)

#else // MYPYC_EXPERIMENTAL

#include <Python.h>

// ABI version -- only an exact match is compatible. This will only be changed in
// very exceptional cases (likely never) due to strict backward compatibility
// requirements.
Expand Down
Loading