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

c-capnproto sync-up merge #4

Open
wants to merge 178 commits into
base: master
Choose a base branch
from

Commits on Feb 5, 2014

  1. Add capn.a target

    Steve Dee committed Feb 5, 2014
    Configuration menu
    Copy the full SHA
    859ab61 View commit details
    Browse the repository at this point in the history
  2. Static capnpc-c

    Steve Dee committed Feb 5, 2014
    Configuration menu
    Copy the full SHA
    f0dc17c View commit details
    Browse the repository at this point in the history
  3. Ignore capn.a

    Steve Dee committed Feb 5, 2014
    Configuration menu
    Copy the full SHA
    322aa16 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2014

  1. Implement serialization to buffers

    Steve Dee committed Feb 21, 2014
    Configuration menu
    Copy the full SHA
    68340f8 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2014

  1. Merge remote-tracking branch 'urbit/master'

    Conflicts:
    	capn-malloc.c
    Steve Dee committed Feb 24, 2014
    Configuration menu
    Copy the full SHA
    89f1ac3 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2014

  1. Initialize x and y unconditionally

    Fixes a compiler warning.
    Steven Dee committed Feb 26, 2014
    Configuration menu
    Copy the full SHA
    823a820 View commit details
    Browse the repository at this point in the history
  2. Add padding to preserve alignment on 32-bit systems

    Steven Dee committed Feb 26, 2014
    Configuration menu
    Copy the full SHA
    cb26aea View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2014

  1. Configuration menu
    Copy the full SHA
    1d79a28 View commit details
    Browse the repository at this point in the history
  2. Added install target

    johandc committed Mar 25, 2014
    Configuration menu
    Copy the full SHA
    1eb82b0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf5eb7f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d84a635 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4cc7785 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2014

  1. Fix build

    Renamed gtest/include to gtest/gtest since that's what the include files
    expected.
    
    Adjusted the Makefile to work through it all.
    baruch committed Aug 3, 2014
    Configuration menu
    Copy the full SHA
    20bd625 View commit details
    Browse the repository at this point in the history
  2. Simpler makefile

    No real need to build a gtest archive, gtest-all.cc includes all the
    files so a single .o is fine.
    baruch committed Aug 3, 2014
    Configuration menu
    Copy the full SHA
    54ca88f View commit details
    Browse the repository at this point in the history
  3. Add a README.md file

    baruch committed Aug 3, 2014
    Configuration menu
    Copy the full SHA
    8a33a18 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d785521 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2014

  1. Forego updating sz in capn_write_mem

    It is not used and we already validated the total buffer size
    beforehand.
    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    49483a6 View commit details
    Browse the repository at this point in the history
  2. Add comments

    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    0071546 View commit details
    Browse the repository at this point in the history
  3. Move initialization closer to use

    Should make it a bit more readable, the variable is used before that
    case as well but doesn't require the zero initialization in that case.
    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    a46581a View commit details
    Browse the repository at this point in the history
  4. Use constants where possible

    The hdr variable gets the same constants as value but it is easier to
    understand that the constants are used than the hdr which needs to be
    traced to the value it received.
    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    24ec009 View commit details
    Browse the repository at this point in the history
  5. Fix use of wrong offset in buffer

    The header of packing is a single byte and nothing was written to the
    first byte anyway.
    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    a83769f View commit details
    Browse the repository at this point in the history
  6. Implement packed memory write

    This uses the capn_deflate function.
    
    The current use may get smaller packing than the maximum possible due to
    the inability to peak around segments as it packs each segment on its
    own. This saves time compared to copying everything into one place and
    saves effort by not requiring to change the interface of capn_deflate to
    support multiple different buffers.
    
    It should be possible to make the capn_deflate state machine better to
    handle the multiple buffers case too.
    baruch committed Aug 6, 2014
    Configuration menu
    Copy the full SHA
    440c662 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2014

  1. Implement capn_write_fd

    baruch committed Aug 7, 2014
    Configuration menu
    Copy the full SHA
    2bdc5c4 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2015

  1. some compile cleanup

    gs640 committed Jan 4, 2015
    Configuration menu
    Copy the full SHA
    232cef8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c653dda View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2015

  1. gtest: Use system gtest and pthread libs

    * Rip out the gtest built in here.  Use the system library.
    * Test against gtest-1.7.0-1 on Arch Linux
    * Add the missing -lpthread library
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    9fe7167 View commit details
    Browse the repository at this point in the history
  2. signedness: Fix obvious sign problems

    * These should be easily verified as correct.
    * Tested on gcc-5.2.0 and clang-3.6.2
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    7d2e122 View commit details
    Browse the repository at this point in the history
  3. test: Remove unused variables

    * Never referenced and generate warnings on modern compilers
    * Tested on gcc-5.2.0 and clang-3.6.2
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    5b3e8f1 View commit details
    Browse the repository at this point in the history
  4. compiler: Fix missing comments

    * Later versions of compilers/pre-processors are upset about the syntax
    * Bracket unterminated string with proper comment tags
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    e933510 View commit details
    Browse the repository at this point in the history
  5. signedness: Fix less obvious issues

    * My compilers mark these as errors
    * Attempt to be more correct
    * Tested on gcc-5.2.0 and clang-3.6.2
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    376b63f View commit details
    Browse the repository at this point in the history
  6. capn: Avoid uninitialized values

    * Return null when appropriate and assign a value earlier.
    kylemanna committed Aug 18, 2015
    Configuration menu
    Copy the full SHA
    6ebba52 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2016

  1. gtest: use installed package, drop files

    (also makes the next merge much easier)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    6ebc068 View commit details
    Browse the repository at this point in the history
  2. gtest: use installed package, drop files

    (also makes the next merge much easier)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    d87beb1 View commit details
    Browse the repository at this point in the history
  3. Partial revert "all: use unsigned types for more variables that repre…

    …sent length"
    
    This reverts commit 0b6f952.
    
    (for merge)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    da77dcc View commit details
    Browse the repository at this point in the history
  4. Merge branch 'baruch' into merge

    Conflicts:
    	Makefile		-- manually resolved
    	compiler/schema.capnp	-- used from liamstask
    	compiler/test.capnp	-- used from liamstask
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    0ddba4f View commit details
    Browse the repository at this point in the history
  5. Revert "gtest: Use system gtest and pthread libs"

    This reverts commit 9fe7167.
    
    (this makes the following merge easier)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    aeeae64 View commit details
    Browse the repository at this point in the history
  6. Merge branch 'kylemanna' into merge

    Conflicts: (manually resolved)
    	capn-malloc.c
    	capn-stream.c
    	capn-test.cpp
    	capn.c
    	capn.h
    	compiler/capnpc-c.c
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    02268ff View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b55d847 View commit details
    Browse the repository at this point in the history
  8. Tag 640Labs as merged

    (No changes in 640Labs that are useful to merge -- just mark as merged.)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    06f6e98 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ae746a3 View commit details
    Browse the repository at this point in the history
  10. fold 2 readme files

    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    56753b0 View commit details
    Browse the repository at this point in the history
  11. Update merged forks

    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    34f150d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    89818b0 View commit details
    Browse the repository at this point in the history
  13. Remove "script" spec from travis.yml

    Travis should autodetect & do the right thing for autoconf projects...
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    b18d178 View commit details
    Browse the repository at this point in the history
  14. Update Travis icon URL

    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    663cfe2 View commit details
    Browse the repository at this point in the history
  15. Fix up Travis CI

    ... it doesn't autodetect that it needs to run autoreconf
    Also add gtest package.
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    c02d6d5 View commit details
    Browse the repository at this point in the history
  16. Fix Travis CI even more...

    automake 1.11 is sufficient (and what's installed by default on CI
    boxes).  Also disable cap'n proto reference (it's not actually used)
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    c92a985 View commit details
    Browse the repository at this point in the history
  17. Travis CI: whatever.

    gtest packages intentionally don't provide binaries anymore.
    Will probably re-add as submodule later.
    eqvinox committed Feb 28, 2016
    Configuration menu
    Copy the full SHA
    48ab119 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2016

  1. Fix empty-object pointers

    Pointers are written as offsets to the segment start;  leaving p->data
    as NULL results in invalid pointers for zero-size objects (particularly,
    lists.)
    eqvinox committed Mar 8, 2016
    Configuration menu
    Copy the full SHA
    332076e View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2016

  1. Configuration menu
    Copy the full SHA
    4146290 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d3b1cad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    811d304 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9335126 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c2faf4e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b18dc3d View commit details
    Browse the repository at this point in the history
  7. lib: fix API

    capn_new_string is exported as symbol but not in the header
    capn_write_mem_packed is internal but the symbol is visible
    eqvinox committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    00eaeeb View commit details
    Browse the repository at this point in the history
  8. add & install pkgconfig file

    eqvinox committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    3f91416 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7ecadef View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    4de69a5 View commit details
    Browse the repository at this point in the history
  11. README: fix travis link

    eqvinox committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    e626b3f View commit details
    Browse the repository at this point in the history
  12. c-capnproto 0.1 release

    eqvinox committed Mar 18, 2016
    Configuration menu
    Copy the full SHA
    b58fa3b View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2016

  1. generate setter and getter

    mikegarts committed Mar 27, 2016
    Configuration menu
    Copy the full SHA
    e870b5d View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2016

  1. Configuration menu
    Copy the full SHA
    61a43a4 View commit details
    Browse the repository at this point in the history
  2. uint8_t cast

    mikegarts committed Mar 29, 2016
    Configuration menu
    Copy the full SHA
    bf2c598 View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2016

  1. Configuration menu
    Copy the full SHA
    90c3473 View commit details
    Browse the repository at this point in the history
  2. don't write out empty structs

    "struct { } foo" is not valid ISO C99; while gcc/clang/icc support it,
    other compilers and tools don't (e.g. pycparser)
    eqvinox committed Apr 6, 2016
    Configuration menu
    Copy the full SHA
    e9df12b View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2016

  1. Add build instructions

    lilith committed Apr 27, 2016
    Configuration menu
    Copy the full SHA
    cee25a3 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #3 from nathanaeljones/patch-1

    Add build instructions
    eqvinox committed Apr 27, 2016
    Configuration menu
    Copy the full SHA
    a15accf View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2016

  1. Configuration menu
    Copy the full SHA
    12ad949 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec9bb14 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2016

  1. include fix

    mikegarts committed May 5, 2016
    Configuration menu
    Copy the full SHA
    1d5a2c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    05f5884 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2016

  1. Define ssize_t for MSVC

    ssize_t is not available in visual studio, nor is sys/param.h We typedef
    intmax_t to ssize_t
    lilith committed May 11, 2016
    Configuration menu
    Copy the full SHA
    8d0ccbe View commit details
    Browse the repository at this point in the history
  2. Define default value for char *e

    Visual studio's execution flow analysis insists that (e) could be
    undefined. I don't see it, but this permits compilation.
    lilith committed May 11, 2016
    Configuration menu
    Copy the full SHA
    8f37e0f View commit details
    Browse the repository at this point in the history
  3. Align capn_segment to 64-bit boundaries on MSVC

    Unless capn_segment is defined with __declspec(align(64)),
    check_segment_alignment fails to compile in x86 mode, as (sizeof(struct
    capn_segment)&7) -> (44 & 7) evaluates to 4
    Always compiles in x64 mode, as (sizeof(struct capn_segment)&7) -> (80 &
    7) evaluates to 0
    lilith committed May 11, 2016
    Configuration menu
    Copy the full SHA
    27df3d6 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2016

  1. Merge pull request #4 from mikegarts/short.circuit.endian

    start making endianness switch less weird
    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    0e850b1 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #5 from mikegarts/working.with.stricter.compilers

    working with stricter compiler flags
    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    2b15c6c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1c0652d View commit details
    Browse the repository at this point in the history
  4. whitespace fixes

    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    48535d0 View commit details
    Browse the repository at this point in the history
  5. lib: make endian check more platform-friendly

    neither Windows nor OSX have endian.h
    
    autoconf checking this makes things worse on Windows too, so let's just
    try endian.h on "unix" systems.
    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    b3b83e0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0abd16d View commit details
    Browse the repository at this point in the history
  7. lib: endianness: don't break strict-aliasing

    Strict aliasing prohibits writing to union members of one type, then
    reading another type.  The read is undefined.  Use memcpy instead (which
    compilers will hopefully optimize away...)
    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    1afce95 View commit details
    Browse the repository at this point in the history
  8. Update autogenerated files

    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    87591da View commit details
    Browse the repository at this point in the history
  9. compiler: add "C::nameinfix" annotation

    allows changing output filenames from "foo.capnp.c" to
    "foo.capnpSOMETHING.c" where SOMETHING is the argument to the
    annotation.
    eqvinox committed Jun 22, 2016
    Configuration menu
    Copy the full SHA
    5d787b6 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2016

  1. lib: make capn_inflate() work with unaligned data

    init_fp itself tries to read 4 bytes for the segment count.
    eqvinox committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    3059f4d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b12856 View commit details
    Browse the repository at this point in the history
  3. lib: don't overrun buffer in capn_write_mem_packed

    Missing braces end up scaling the offset by * 4 ... which is actually a
    stack/heap overflow.
    eqvinox committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    33ae16b View commit details
    Browse the repository at this point in the history
  4. lib: make capn_{de,in}flate + capn_stream private

    There is no point in having these functions be part of the public API.
    eqvinox committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    f2058f6 View commit details
    Browse the repository at this point in the history
  5. build: fix filename

    eqvinox committed Jun 27, 2016
    Configuration menu
    Copy the full SHA
    97f30c5 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2016

  1. Revert "lib: endianness: don't break strict-aliasing"

    This reverts commit 1afce95.
    
    Turns out this is a misunderstanding of the C standard...  meh.
    eqvinox committed Jun 30, 2016
    Configuration menu
    Copy the full SHA
    81352b0 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2016

  1. compiler: add find_node_mayfail(), remove hack

    Fixes github issue #11, also makes it easier to use annotations.
    eqvinox committed Jul 19, 2016
    Configuration menu
    Copy the full SHA
    52ca907 View commit details
    Browse the repository at this point in the history
  2. compiler: add annotation to enable field get/set

    Generating per-field getters/setters adds a lot of functions; this makes
    them switchable with an annotation in the source schema.
    eqvinox committed Jul 19, 2016
    Configuration menu
    Copy the full SHA
    da663f8 View commit details
    Browse the repository at this point in the history
  3. compiler: apply name infix on include filenames

    This fixes #include output when $C.nameinfix is used.
    eqvinox committed Jul 19, 2016
    Configuration menu
    Copy the full SHA
    c322bc9 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2016

  1. Configuration menu
    Copy the full SHA
    54a7bb7 View commit details
    Browse the repository at this point in the history
  2. c-capnproto 0.2 release

    eqvinox committed Jul 20, 2016
    Configuration menu
    Copy the full SHA
    75f7901 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2016

  1. Configuration menu
    Copy the full SHA
    de5a960 View commit details
    Browse the repository at this point in the history
  2. Drop gtest directory

    aballier committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    c628547 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2016

  1. lib: make buf arg const in write_fd pointer

    For capn_write_fd() the write() function would be ideal to pass as
    write_fd, but write() has type ssize_t (*)(int, const void *, size_t),
    whereas write_fd expects ssize_t (*)(int, void *, size_t). Passing
    write() directly with GCC 5.4 causes a warning
    -Wincompatible-pointer-types (on by default).
    ThirteenFish committed Aug 7, 2016
    Configuration menu
    Copy the full SHA
    7b7346a View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2016

  1. Ensure capn segment is aligned properly when build with gcc too. Fixe…

    …s build on 32 bits arm.
    aballier committed Sep 28, 2016
    Configuration menu
    Copy the full SHA
    de11757 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    95d81bc View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2017

  1. Configuration menu
    Copy the full SHA
    f16fae5 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #14 from fluffysquirrels/master

    Fix GCC warnings in initializers for capn_val0 and capn_seg.
    eqvinox committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    55b958c View commit details
    Browse the repository at this point in the history
  3. Merge pull request #12 from ThirteenFish/master

    lib: make buf arg const in write_fd pointer
    eqvinox committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    462f6eb View commit details
    Browse the repository at this point in the history
  4. Fix compiler warnings and errors in GCC.

    Alex Helfet committed Mar 22, 2017
    Configuration menu
    Copy the full SHA
    0be6206 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1b25eae View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2017

  1. Configuration menu
    Copy the full SHA
    ef88fd8 View commit details
    Browse the repository at this point in the history
  2. .gitignore .dirstamp files created during the build.

    Alex Helfet committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    a93ae12 View commit details
    Browse the repository at this point in the history
  3. Remove UNUSED(x) macro. No longer needed.

    Alex Helfet committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    57d0ffe View commit details
    Browse the repository at this point in the history
  4. 8 byte alignment on capn_segment, updated comments about this.

    As discussed in PR: #15 (comment)
    Alex Helfet committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    408505a View commit details
    Browse the repository at this point in the history
  5. Merge pull request #15 from fluffysquirrels/master

    Fix runtime library compiler warnings and errors in GCC.
    eqvinox committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    49031ea View commit details
    Browse the repository at this point in the history
  6. compiler: If an explicit symbol wasn't provided, make generated capn_…

    …val%d variables static.
    Alex Helfet committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    3621730 View commit details
    Browse the repository at this point in the history
  7. Example usage in unit test.

    Alex Helfet committed Mar 23, 2017
    Configuration menu
    Copy the full SHA
    29a1342 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2017

  1. Fix build errors in tests/example-test.cpp.

    Alex Helfet committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    e32a85b View commit details
    Browse the repository at this point in the history
  2. Add extra files to Makefile.am.

    Alex Helfet committed Mar 24, 2017
    Configuration menu
    Copy the full SHA
    5a282f6 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2017

  1. Add all .capnp files to make dist archive.

    Alex Helfet committed Mar 26, 2017
    Configuration menu
    Copy the full SHA
    6b52d61 View commit details
    Browse the repository at this point in the history
  2. Compiler generates absolute #include paths from .capnp imports with l…

    …eading /'s.
    
    As specified in https://capnproto.org/language.html#imports and implemented
    in the C++ compiler output plugin.
    Alex Helfet committed Mar 26, 2017
    Configuration menu
    Copy the full SHA
    a379aa8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    73b5d56 View commit details
    Browse the repository at this point in the history
  4. Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema f…

    …iles.
    Alex Helfet committed Mar 26, 2017
    Configuration menu
    Copy the full SHA
    989acc3 View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2017

  1. Rewrite tests/example-test.cpp to use addressbook example from capnpr…

    …oto C++ project.
    Alex Helfet committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    531eefc View commit details
    Browse the repository at this point in the history
  2. Add comiler/c.capnp.h to Makefile.am noinst_HEADERS.

    Alex Helfet committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    f7cd568 View commit details
    Browse the repository at this point in the history
  3. Add example that uses accessor functions.

    Alex Helfet committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    9530312 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2017

  1. Add some missing capn_free() calls to the example test.

    Alex Helfet committed Mar 30, 2017
    Configuration menu
    Copy the full SHA
    a80f245 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2017

  1. Add URL for original addressbook example; example to assert list leng…

    …th with capn_len().
    Alex Helfet committed Apr 2, 2017
    Configuration menu
    Copy the full SHA
    4380d28 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2017

  1. Merge branch 'pull/16'

    eqvinox committed Apr 5, 2017
    Configuration menu
    Copy the full SHA
    7c81906 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2017

  1. Support creation of struct lists with size 0

    The case of creating capnp lists of size 0 didn't consider lists of
    composite elements (structs), which requires the addition of list
    element information.
    
    This commit removes the case of size 0 when creating the list in order
    to enable the creation of 0 sized lists of any element type (struct).
    jlferrer committed May 17, 2017
    Configuration menu
    Copy the full SHA
    c802ad3 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2017

  1. Resolve pointers in capn_getv*

    Reported by @xvuko, fixes #20
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    e0d1c36 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #19 from jlferrer/fix_empty_lists

    Support creation of struct lists with size 0
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    2330c17 View commit details
    Browse the repository at this point in the history
  3. Add stddef.h for POSIX ssize_t

    Recent GCC versions / OS headers don't automatically provide ssize_t
    anymore, leading to compiler errors.
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    0ffd3fd View commit details
    Browse the repository at this point in the history
  4. Silence GCC unnamed union warning

    We need the unnamed struct/union support, this is user-facing API.
    So, silence the -Wpedantic warning.
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    99e9412 View commit details
    Browse the repository at this point in the history
  5. Silence warning on unused struct parameter

    When generating code for an empty struct, the read_/write_ functions
    would print warnings about the unused "s" pointer.  Silence these.
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    b0810da View commit details
    Browse the repository at this point in the history
  6. Silence empty struct warning

    Last but not least, -Wpedantic warns about empty structs.  With this,
    -Wpedantic build is now clean of warnings on gcc 5.4.0 and clang 4.0.
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    aa1f31d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    89dd18a View commit details
    Browse the repository at this point in the history
  8. Merge branch 'issue20'

    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    aab56f1 View commit details
    Browse the repository at this point in the history
  9. Use proper format specifiers for size_t.

    aballier authored and eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    704a34f View commit details
    Browse the repository at this point in the history
  10. Merge branch 'jamvideosolutions/master'

    (Marker merge -- cherry-picked the size format; the align one is
    superseded and the gtest ones collide with gtest's upstream
    recommendations [only Gentoo has gtest as a package].)
    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    5cbd52e View commit details
    Browse the repository at this point in the history
  11. c-capnproto 0.3 release

    eqvinox committed May 19, 2017
    Configuration menu
    Copy the full SHA
    cb30563 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2018

  1. compiler: Allocate all possible space for constants

    When the c-capnp compiler runs, currently only takes the len of 1st
    segment in the list as a capacity used in the generator for constants
    definitions.
    
    This works when the schema processing only generates 1 segment, or the
    1st segment has 8192 bytes. There are cases where the fd returns
    multiple segments an the first one has very low capacity (e.g. 96 or 80).
    Hence, if more constants require to be allocated for the current schema
    it will have misleading positions.
    
    This commit takes a conservative approach by summing up all the lenghts
    of capnproto segments obtained at the fd_init call of the compiler.
    Those values are taken to set the memory allocation and the max
    capacity for the segment utilized in the code generation.
    jose luis ferrer committed Feb 1, 2018
    Configuration menu
    Copy the full SHA
    d924032 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2019

  1. Configuration menu
    Copy the full SHA
    bd9911a View commit details
    Browse the repository at this point in the history
  2. compiler/str.h: include stdarg.h for va_list

    With some toolchains, compilation of str.c produced the following error:
    
    compiler/str.h:56:50: error: unknown type name ‘va_list’
     int str_vaddf(struct str *v, const char *format, va_list ap) ATTR(2,0);
                                                      ^~~~~~~
    
    One toolchain had the following in its stdarg.h:
    "We deliberately do not define va_list when called from
    stdio.h, because ANSI C says that stdio.h is not supposed to
    define va_list."
    
    str.c includes stdio.h, but none of the prior includes result in the
    inclusion of stdarg.h. Therefore, explicitly include it in str.h to fix
    the issue on toolchains following this ANSI C rule.
    
    Signed-off-by: Joel Carlson <JoelsonCarl@gmail.com>
    JoelsonCarl authored and fluffysquirrels committed Apr 22, 2019
    Configuration menu
    Copy the full SHA
    9053ebe View commit details
    Browse the repository at this point in the history

Commits on Dec 28, 2020

  1. Fix bug where enums were treated interchangeably with uint16_t.

    ANSI C makes no guarantee about the size of an enum, only that it will be the
    minimum required integer type that can hold all the given values. Treating
    enums as interchangeable with uint16_t data caused undefined behavoiur on
    platforms where enums were always at least 32 bits.
    detly committed Dec 28, 2020
    Configuration menu
    Copy the full SHA
    e13c143 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2021

  1. Add an annotation to skip including header files generated from specific

    schema files.
    
    Some schema files (eg. those that only decalare annotations) do not actually
    result in any generated C code. They do not need to have a corresponding
    include directive for C files generated from schemas that include them. This
    introduces a "donotinclude" annotation that takes the Cap'n Proto ID (a
    UInt64) of any such files and skips generating the include directive for them.
    detly committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    b995a09 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fe3a57d View commit details
    Browse the repository at this point in the history
  3. Add an annotation to typedef structs and enums.

    A new annotation 'typedefto' allows you to make a typedef in the generated
    code for structs and enums (but not union 'which' enums).
    detly committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    9153fc3 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2021

  1. Fix code generation for nested unions.

    When a union is nested inside another union, it must be enclosed in a struct
    so that its "which" member is not overlapping with its other members.
    detly committed Jan 14, 2021
    Configuration menu
    Copy the full SHA
    6661fc9 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2021

  1. Allow field name to be 'p'.

    Alexandre Snarskii committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    72efa0b View commit details
    Browse the repository at this point in the history
  2. Fix FreeBSD builds

    Alexandre Snarskii committed Feb 1, 2021
    Configuration menu
    Copy the full SHA
    86bee96 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2021

  1. Configuration menu
    Copy the full SHA
    3c0b223 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2021

  1. Merge pull request #41 from detly/enum_cast

    Fix bug where enums were treated interchangeably with uint16_t.
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    515c06c View commit details
    Browse the repository at this point in the history
  2. Merge pull request #44 from detly/nested_unions

    Fix code generation for nested unions.
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    b619a87 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #42 from detly/annotations

    Two extra annotations: donotinclude and typedefto
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    024dca6 View commit details
    Browse the repository at this point in the history
  4. Implemented capn_size() for dynamically calculating the required buff…

    …er size for capn_write_mem().
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    d29facc View commit details
    Browse the repository at this point in the history
  5. Simplified size calculation.

    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    bbc208c View commit details
    Browse the repository at this point in the history
  6. Make the comment for capn_size() clearer that it only applies to unpa…

    …cked serialisation.
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    a2179f4 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #37 from detly/write_size

    Implemented capn_size() for calculating buffer size
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    939aa30 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #47 from QQNN-blue/change_capn_write_mem_return_va…

    …l_type
    
    Change capn_write_mem return value from int to int64_t
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    0650ccb View commit details
    Browse the repository at this point in the history
  9. Use int64_t for the return value of capn_size(). This makes it consis…

    …tent with a recent change to capn_write_mem().
    detly committed May 10, 2021
    Configuration menu
    Copy the full SHA
    05482f3 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. only generate '#include' for imports that are used

    This patch modifies the code generator to only generate C-language
    `#include <imported_schema.h>` lines for imports that are actually used.
    
    Imagine this transitive import scenario: schema A imports a definition
    from schema B.  However, the definition imported from schema B was
    itself imported from schema C.
    
    In this case, the code generated for schema A need not include the
    header file for schema B, as it only needs definitions from schema C.
    
    Signed-off-by: Curt Brune <curt@enfabrica.net>
    cbrune committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    1772643 View commit details
    Browse the repository at this point in the history
  2. add a capnp annotation for creating name spaces

    This patch adds an annotation for creating name spaces within
    capnproto files with the C-language code generator.
    
    Use the annotation like this:
    
      using C = import "/c.capnp";
      $C.namespace("sample_namespace_");
    
    The string passed into the namespace annotation is prepended to the
    name of all the struct's in the schema file.
    
    Signed-off-by: Curt Brune <curt@enfabrica.net>
    cbrune committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    c70796b View commit details
    Browse the repository at this point in the history
  3. add 'const' keyword to generated constants

    This patch adds the 'const' keyword to constant definitions generated
    by the compiler.  Previously the compiler generated constants like
    this:
    
      foo.h
      ======
    
      extern int foo;
    
      foo.c
      ======
    
      int foo = 5;
    
    With this patch, the generated code looks like:
    
      foo.h
      ======
    
      extern const int foo;
    
      foo.c
      ======
    
      const int foo = 5;
    
    Signed-off-by: Curt Brune <curt@enfabrica.net>
    cbrune committed Oct 14, 2022
    Configuration menu
    Copy the full SHA
    40d6895 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. add #define definitions for integer constants

    When working with integer constants, it is convenient to use #define
    macros for the constants, as opposed to a variable of constant type.
    
    This patch adds a '#define CONSTANT (value)' definition to the
    generated header files.  The name of the constant is in
    SCREAMING_SNAKE_CASE, converted from the regular camelCase.
    
    Signed-off-by: Curt Brune <curt@enfabrica.net>
    cbrune committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    3385b1e View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2023

  1. Initial Meson build support

    XVilka committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    6eb98cb View commit details
    Browse the repository at this point in the history
  2. Ignore subprojects in git

    XVilka committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    6b8e3ca View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    53f6def View commit details
    Browse the repository at this point in the history
  4. Add GitHub CI

    XVilka committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    6377038 View commit details
    Browse the repository at this point in the history
  5. README: make project state clear

    Signed-off-by: David Lamparter <equinox@diac24.net>
    eqvinox committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    b87f0ee View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4a39ec4 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    560f2c7 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2116160 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0653675 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5c4e497 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4109705 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    32def19 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    32520c5 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    c79b3af View commit details
    Browse the repository at this point in the history
  15. Fix random warnings

    Signed-off-by: David Lamparter <equinox@diac24.net>
    eqvinox committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    b2b7ade View commit details
    Browse the repository at this point in the history
  16. Fix bool defaults for non-first bit

    Fixes: #58
    Signed-off-by: David Lamparter <equinox@diac24.net>
    eqvinox committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    eb1839e View commit details
    Browse the repository at this point in the history
  17. Revert "Merge pull request #54 from cbrune/curt/const"

    This reverts commit 4109705, reversing
    changes made to 5c4e497.
    eqvinox committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    79d6035 View commit details
    Browse the repository at this point in the history
  18. Update autogenerated files

    Signed-off-by: David Lamparter <equinox@diac24.net>
    eqvinox committed Apr 23, 2023
    Configuration menu
    Copy the full SHA
    632f0d7 View commit details
    Browse the repository at this point in the history