summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2023-07-13docs: disable GitHub Jekyll post processingJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-13docs: further reworkJo-Philipp Wich
- Split README.md into several tutorial pages - Expand all menu panes - Hide class menu entries - Add usage information Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-13docs: fix markup quirksJo-Philipp Wich
Pipe symbols inside table definitions must be escaped. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-13docs: add information about memory management and operator precedenceJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-13Merge pull request #164 from jow-/docs-improvementsJo-Philipp Wich
docs: various improvements
2023-07-13docs: various improvementsJo-Philipp Wich
- Switch JSDoc theme to "clean-jsdoc-theme" - Add some custom CSS and JS tweaks to the theme - Use a condensed README.md for the toplevel directory - Include a longer README.md in the documentation portal - Tweak JSDoc annotations for better output results - Register `ucode.mein.io` CNAME Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12Merge pull request #163 from jow-/docs-improvementsJo-Philipp Wich
fs: complete function documentation coverage
2023-07-12Merge pull request #162 from jow-/fs-ftello-fseekoJo-Philipp Wich
fs: use `fseeko()` and `ftello()`
2023-07-12fs: use `fseeko()` and `ftello()`Jo-Philipp Wich
Use `fseeko()` and `ftello()` instead of `fseek()` and `ftell()` respectively in order to be able to deal with large file offsets. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12fs: complete function documentation coverageJo-Philipp Wich
Add missing function documentation and return value annotations. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12github: drop superfluous CNAME fileJo-Philipp Wich
Drop CNAME file which was automatically created by the Github ui during pages testing. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12Merge pull request #161 from jow-/docs-add-jsdocJo-Philipp Wich
Add initial JSDoc infrastructure
2023-07-12Create CNAMEJo-Philipp Wich
2023-07-12lib: add JSDoc documentationJo-Philipp Wich
Add JSDoc documentation blocks to all exported core functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12fs: add JSDoc documentationJo-Philipp Wich
Add JSDoc documentation blocks to all exported filesystem functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12math: add JSDoc documentationJo-Philipp Wich
Add JSDoc documentation blocks to all exported math functions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12docs: add initial JSDoc infrastructureJo-Philipp Wich
Introduce the infrastructure for building ucode module documentation using JSDoc annotations. To build the documentation, run `npm install` followed by `npm run doc`. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12Merge pull request #158 from jow-/offset-accoutingJo-Philipp Wich
Fixes for source offset tracking
2023-07-12source: fix source offset accountingJo-Philipp Wich
- When skipping the interpreter line, don't count it's newline twice - Fix reporting byte offsets beyond the end of line Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12lexer: don't count EOF token as newlineJo-Philipp Wich
Avoid reporting a nonexisting final line by not counting the EOF character as physical newline. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-07-12Merge pull request #159 from jow-/ciJo-Philipp Wich
ci: switch to official openwrt/gh-action-sdk
2023-07-12ci: switch to official openwrt/gh-action-sdkJo-Philipp Wich
Utilize the official openwrt/gh-action-sdk CI actions to test-build OpenWrt packages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-06-06Merge pull request #153 from jow-/lib-sort-object-supportJo-Philipp Wich
lib: support object ordering in `uc_sort()`
2023-06-06Merge pull request #156 from nbd168/nl80211-iftypesJo-Philipp Wich
nl80211: add constants for iftypes
2023-06-05nl80211: add constants for iftypesFelix Fietkau
Useful for adding/removing interfaces Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-30lib: support object ordering in `uc_sort()`Jo-Philipp Wich
Extend `uc_sort()` to utilize `ucv_object_sort()` in order to support reordering object keys. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-05-30types: implement ucv_object_sort()Jo-Philipp Wich
Introduce a new function `ucv_object_sort()` which works similar to `ucv_array_sort()` and allows reordering the keys of an object. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-05-30Merge pull request #155 from luizluca/luizluca-patch-1Jo-Philipp Wich
README.md: fix debian dependencies
2023-05-30compiler: fix memory leak in uc_compiler_compile_import on early exitChristian Marangi
Fix Coverity Scan CID 1521107 reporting a memory leak in uc_compiler_compile_import on early exit due to namelist not correctly put before return. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> [add empty line before return] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-05-29README.md: fix debian dependenciesLuiz Angelo Daros de Luca
Build fails without pkg-config. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2023-05-28vm: immediately release arguments on calls with invalid spreadsJo-Philipp Wich
Ensure to release the `this` context and the temporary argument stash when we raise a non iterable type exception due to non-iterable values while precessing spread operations in function call arguments. Those values would've been garbage collected eventually but explicitly releasing them here will allow the vm to free them immediately. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-05-27Merge pull request #150 from nbd168/misc-improvementsJo-Philipp Wich
2023-05-27vm: clear vm->alloc_refs in uc_gc_commonFelix Fietkau
This avoids unnecessary gc calls when configuring a gc interval while also explicitly calling ucv_gc from C code embedding a vm at convenient points in time. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-27ubus: add support for strings containing null bytesFelix Fietkau
When converting ucode strings to blobmsg, use blobmsg_add_field in order to explicltly pass the length of the data. In the other direction, use ucv_string_new_length based on the attribute length. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-27struct: remove state->lenFelix Fietkau
It is unused and I couldn't find any purpose for it Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-27main: add user specified library search paths before default pathFelix Fietkau
Allow -L to add library paths that take precedence over the built-in ones. Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-27Merge pull request #152 from Ansuel/fix-memory-leakJo-Philipp Wich
program: fix memory leak in read_sourceinfo
2023-05-27program: fix memory leak in read_sourceinfoChristian Marangi
Fix Coverty Scan CID 1521109 reporting a memory leak for path not freed on read_size_t fail. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-26Merge pull request #151 from ynezz/ynezz/unbreak-ciJo-Philipp Wich
ci: unbreak failing builds by using fixed gh-actions-openwrt-ci-sdk
2023-05-26ci: update the workflowsPetr Štetiar
* use mediatek/mt7622 SDK to have arm64 build test coverage * use latest Ubuntu container to stay current * use v3 of checkout action to stay current Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-26ci: cancel concurrent buildsPetr Štetiar
To save some build resources, lets cancel ongoing builds after force pushing new sources into the pull request branch. Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-26ci: fix broken imx6-generic SDK buildPetr Štetiar
imx6-generic was renamed to imx-cortexa9 Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-05-26ci: unbreak failing builds by using fixed gh-actions-openwrt-ci-sdkPetr Štetiar
SDK containers hosted under `openwrtorg` Docker organization were deprecated so lets use fixed action which uses new `openwrt` organization. References: https://lists.openwrt.org/pipermail/openwrt-devel/2023-March/040728.html Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-04-03Merge pull request #148 from jow-/uci-fix-commitJo-Philipp Wich
uci: fix ctx.commit() without arguments
2023-04-03uci: fix ctx.commit() without argumentsJo-Philipp Wich
A uci commit operation may invalidate the package pointer, leading to an infinite loop while iterating the packages to commit. Refactor the code to first build a string list of configurations, then iterating it in order to avoid the iterator invalidation. While we're at it, also allow restricting save and revert operations to single configs, which was rejected as invalid before. Fixes: #146 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-03-17ucode: also link libresolv if ns_initparse() is not foundJo-Philipp Wich
Recent glibc versions require linking libresolv to obtain ns_initparse(). Fixes: #144 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-03-17ubus: support multiple call return valuesJo-Philipp Wich
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-02-13Merge pull request #143 from nbd168/rtnl-fixJo-Philipp Wich
rtnl: add missing uc_vm_registry_set call
2023-02-13rtnl: add missing uc_vm_registry_set callFelix Fietkau
Fixes maintaining the listener array Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-13Merge pull request #142 from nbd168/ref-fixesJo-Philipp Wich
Fix reference count issues