Skip to content

Commit

Permalink
Merge pull request #394 from fangerer/fa/fixed-width-long_cstring-enc
Browse files Browse the repository at this point in the history
Use fixed-width integers and clarify encoding of C strings.
  • Loading branch information
fangerer authored Jan 23, 2023
2 parents 599d072 + 36d8d40 commit e8c7c1d
Show file tree
Hide file tree
Showing 23 changed files with 831 additions and 503 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
# Duplicate changes to this matrix to 'poc_tests'
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ['3.9', '3.10']
compiler: [""]
include:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ['3.10']
include:
- os: ubuntu-latest
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
continue-on-error: true
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ['3.9']

steps:
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-11, windows-latest]
python-version: ['3.10']

steps:
Expand Down Expand Up @@ -343,6 +343,7 @@ jobs:
cpp_check:
name: Cppcheck static analysis
runs-on: 'ubuntu-20.04'
continue-on-error: true
steps:
- uses: actions/checkout@v3

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ cppcheck: cppcheck-build-dir
--inline-suppr \
--suppress=allocaCalled \
-I /usr/local/include \
-I /usr/include \
-I ${PYTHON_INC} \
-I hpy/devel/include/ \
-I hpy/devel/include/hpy/ \
Expand Down
6 changes: 3 additions & 3 deletions hpy/debug/src/_debugmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ HPyDef_GET(DebugHandle_is_closed, "is_closed",
static UHPy DebugHandle_is_closed_get(HPyContext *uctx, UHPy self, void *closure)
{
DebugHandleObject *dh = DebugHandleObject_AsStruct(uctx, self);
return HPyBool_FromLong(uctx, dh->handle->is_closed);
return HPyBool_FromBool(uctx, dh->handle->is_closed);
}

HPyDef_GET(DebugHandle_raw_data_size, "raw_data_size",
Expand All @@ -267,9 +267,9 @@ static UHPy DebugHandle_cmp_impl(HPyContext *uctx, UHPy self, UHPy o, HPy_RichCm

switch(op) {
case HPy_EQ:
return HPyBool_FromLong(uctx, dh_self->handle == dh_o->handle);
return HPyBool_FromBool(uctx, dh_self->handle == dh_o->handle);
case HPy_NE:
return HPyBool_FromLong(uctx, dh_self->handle != dh_o->handle);
return HPyBool_FromBool(uctx, dh_self->handle != dh_o->handle);
default:
return HPy_Dup(uctx, uctx->h_NotImplemented);
}
Expand Down
80 changes: 40 additions & 40 deletions hpy/debug/src/autogen_debug_ctx_init.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8c7c1d

Please sign in to comment.