[parrot/parrot] f744a2: [cage] change UNUSED(arg) to SHIM in the decl #105...

GitHub noreply at github.com
Fri Mar 7 20:09:55 UTC 2014


  Branch: refs/heads/rurban/SHIM-gh1052
  Home:   https://github.com/parrot/parrot
  Commit: f744a20f6823a3a166cd4e74ca9424d12c87c5b9
      https://github.com/parrot/parrot/commit/f744a20f6823a3a166cd4e74ca9424d12c87c5b9
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2014-03-07 (Fri, 07 Mar 2014)

  Changed paths:
    M compilers/imcc/imcc.y
    M compilers/imcc/parser_util.c
    M compilers/imcc/pbc.c
    M compilers/imcc/pcc.c
    M compilers/imcc/symreg.c
    M include/parrot/debugger.h
    M include/parrot/encoding.h
    M include/parrot/oplib/core_ops.h
    M include/parrot/oplib/ops.h
    M include/parrot/opsenum.h
    M include/parrot/packfile.h
    M src/call/context.c
    M src/call/ops.c
    M src/debug.c
    M src/embed/pmc.c
    M src/gc/alloc_resources.c
    M src/gc/gc_gms.c
    M src/gc/gc_inf.c
    M src/gc/gc_private.h
    M src/gc/mark_sweep.c
    M src/gc/string_gc.c
    M src/interp/api.c
    M src/io/api.c
    M src/io/io_private.h
    M src/io/pipe.c
    M src/io/socket.c
    M src/io/stringhandle.c
    M src/io/utilities.c
    M src/ops/core.ops
    M src/ops/core_ops.c
    M src/ops/experimental.ops
    M src/packfile/api.c
    M src/packfile/pf_items.c
    M src/platform/generic/exec.c
    M src/pmc/bigint.pmc
    M src/pmc/imageiothaw.pmc
    M src/pmc/integer.pmc
    M src/runcore/cores.c
    M src/string/encoding.c
    M src/string/encoding/shared.c
    M src/string/encoding/shared.h
    M src/utils.c

  Log Message:
  -----------
  [cage] change UNUSED(arg) to SHIM in the decl #1052

UNUSED just adds code to please the compiler unused warnings, but we should
really declare the args as such with SHIM()
We need UNUSED only in .pmc declaration because we have no control over
SHIM, the pmc2c compiler does it for us there.

Exceptions: io vtable methods keep the 2nd handle arg. The C abi defines
caller cleanup, so we could declare some of them with empty args, but for
the sake of API sanity we accept at least 2 args.

Also do not return unused values, rather cast to (void) and
strip PARROT_WARN_UNUSED_RESULT attributes on them.




More information about the parrot-commits mailing list