Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup references to yajl #147

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Nov 28, 2024

Refers to #138

@saschagrunert
Copy link
Member Author

saschagrunert commented Nov 28, 2024

@xw19 there are still some references to yajl in the code:

src/ocispec/json_common.c
8:#define YAJL_GET_OBJECT_NO_CHECK(v) (&(v)->u.object)
9:#define YAJL_GET_STRING_NO_CHECK(v) ((v)->u.string)

src/ocispec/sources.py
137:        c_file.append(f'        yajl_val tmp = get_val (tree, "{obj.origname}", yajl_t_string);\n')
141:            c_file.append('                yajl_val *items = YAJL_GET_ARRAY_NO_CHECK(tmp)->values;\n')
142:            c_file.append(f'                ret->{obj.fixname} = calloc ( YAJL_GET_ARRAY_NO_CHECK(tmp)->len + 1, sizeof (*ret->{obj.fixname}));\n')
146:            c_file.append('                for (j = 0; j < YAJL_GET_ARRAY_NO_CHECK(tmp)->len; j++)\n')
148:            c_file.append('                    char *str = YAJL_GET_STRING (itmes[j]);\n')
154:            c_file.append('            char *str = YAJL_GET_STRING (tmp);\n')
686:                     f'for key \'{keyname}\': %s", YAJL_GET_NUMBER (val), strerror (-invalid)) < 0)\n')

Are they required or can I removed them as well?

Edit: Removed them.

Signed-off-by: Sascha Grunert <[email protected]>
@saschagrunert
Copy link
Member Author

@xw19 PTAL

@saschagrunert saschagrunert changed the title WIP: Cleanup references to yajl Cleanup references to yajl Nov 28, 2024
@xw19
Copy link

xw19 commented Nov 28, 2024

LGTM

@xw19
Copy link

xw19 commented Nov 28, 2024

I have one concern in all of our builds I am observing that test suites are not running or not reporting

https://github.com/containers/libocispec/actions/runs/12065395898/job/33644073262?pr=147#step:3:683

@saschagrunert saschagrunert merged commit e9f0fb4 into containers:switch-to-jansson Nov 28, 2024
6 checks passed
@saschagrunert saschagrunert deleted the yajl-refs branch November 28, 2024 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants