profile
viewpoint
Maxim Zhukov Mephistophiles D-Link

Mephistophiles/vim-sleuth 2

sleuth.vim: Heuristically set buffer options

Mephistophiles/a.vim 0

Alternate Files quickly (.c --> .h etc)

Mephistophiles/alias-tips 0

An oh-my-zsh plugin to help remembering those aliases you defined once

Mephistophiles/CCTree 0

Vim CCTree plugin

Mephistophiles/deoplete.nvim 0

:stars: Dark powered asynchronous completion framework for neovim/Vim8

Mephistophiles/grc 0

generic colouriser

Mephistophiles/guake 0

Drop-down terminal for GNOME

Mephistophiles/highlight 0

Source code to formatted text converter

Mephistophiles/jansson 0

C library for encoding, decoding and manipulating JSON data

issue commentbootlin/elixir

Jump directly to symbol definition if it's on the same file you're on

+1. Needed for me

carmeli-tamir

comment created time in 18 hours

startedjohannhof/difference.rs

started time in 6 days

starteddandavison/delta

started time in 6 days

pull request commentakheron/jansson

[RFC] [WIP] Add support getn, setn functions

@akheron, @coreyfarrell friendly bump. Let's decide a destiny for this PR: either close, or rework, or merge this changes. Thanks!

Mephistophiles

comment created time in 20 days

pull request commentakheron/jansson

add json_object_getn for substring

Hi, The PR #520 has already implement similar functions.

irov

comment created time in a month

issue commentakheron/jansson

Does replacing a key decrements the reference count ?

Yep, it will be decremented and destroyed. Stacktrace:

  • hashtable_set https://github.com/akheron/jansson/blob/4c9018cc4c372f33013806ce7914fda965e3f9aa/src/hashtable.c#L209-L212
  • json_object_set_new_nocheck https://github.com/akheron/jansson/blob/4c9018cc4c372f33013806ce7914fda965e3f9aa/src/value.c#L117
  • json_object_set_new https://github.com/akheron/jansson/blob/4c9018cc4c372f33013806ce7914fda965e3f9aa/src/value.c#L131
  • json_object_set https://github.com/akheron/jansson/blob/4c9018cc4c372f33013806ce7914fda965e3f9aa/src/jansson.h#L225-L226
Sunslash

comment created time in 3 months

Pull request review commentakheron/jansson

[RFC] [WIP] Add support getn, setn functions

 static void test_bad_args(void) {     json_decref(num); } +static void test_keylen(void) {+    json_t *obj = json_object();+    const char key[] = {'t', 'e', 's', 't', '1'};+    const char key2[] = {'t', 'e', 's', 't'};

Added, plus added sample: const char key4[] = {'t', 'e', 's', 't', '\0'};

Mephistophiles

comment created time in 3 months

Pull request review commentakheron/jansson

[RFC] [WIP] Add support getn, setn functions

 static pair_t *hashtable_find_pair(hashtable_t *hashtable, bucket_t *bucket,     list = bucket->first;     while (1) {         pair = list_to_pair(list);-        if (pair->hash == hash && strcmp(pair->key, key) == 0)+        if (pair->hash == hash && pair->key_len == key_len &&+            strncmp(pair->key, key, key_len) == 0)

Replaced, thanks for your review!

Mephistophiles

comment created time in 3 months

push eventMephistophiles/jansson

Nan Xiao

commit sha e15fd861e1f571973948ad9b4ba309529cbcf75b

Update apiref.rst

view details

Petri Lehtinen

commit sha 4c9018cc4c372f33013806ce7914fda965e3f9aa

Merge pull request #521 from NanXiao/patch-1 Update apiref.rst

view details

Maxim Zhukov

commit sha 8cf0bec4d07b66a79e0ceba598a0218b45b85c4b

Pass length of the key to internal API Use key length for internal API Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>

view details

Maxim Zhukov

commit sha 0fab02f8dbbe0ce8778c5e6c6af284a7ceac29fc

introduce new API with working non terminated strings Added functions for workings with non null-terminated strings: * json_object_getn * json_object_setn * json_object_setn_nocheck * json_object_setn_new * json_object_setn_new_nocheck * json_object_deln Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>

view details

push time in 3 months

more