Skip to content

Commit

Permalink
Brought into compliance with Google open-source policies.
Browse files Browse the repository at this point in the history
- removed myself from Author headers in source files.
- removed copyright notices from source file headers.
- added CONTRIBUTING.md
  • Loading branch information
haberman committed Jul 8, 2015
1 parent 6d9a9c7 commit 49dab06
Show file tree
Hide file tree
Showing 72 changed files with 375 additions and 681 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## <a name="cla"></a> Signing the CLA

Please sign the [Google Contributor License Agreement
(CLA)](https://cla.developers.google.com/)
before sending pull requests. For any code changes to be
accepted, the CLA must be signed. It's a quick process, I
promise!
3 changes: 0 additions & 3 deletions tests/bindings/googlepb/test_vs_proto2.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
*
* A test that verifies that our results are identical to proto2 for a
* given proto type and input protobuf.
Expand Down
3 changes: 0 additions & 3 deletions tests/json/test_json.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2014 Google Inc. See LICENSE for details.
*
* A set of tests for JSON parsing and serialization.
*/
Expand Down
3 changes: 0 additions & 3 deletions tests/pb/test_decoder.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
*
* An exhaustive set of tests for parsing both valid and invalid protobuf
* input, with buffer breaks in arbitrary places.
Expand Down
5 changes: 0 additions & 5 deletions tests/pb/test_varint.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
*/

#include <stdio.h>
#include "upb/pb/varint.int.h"
Expand Down
4 changes: 0 additions & 4 deletions tests/test_cpp.cc
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Tests for C++ wrappers.
*/
Expand Down
10 changes: 3 additions & 7 deletions tests/test_def.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
*
* Test of defs and symtab. There should be far more tests of edge conditions
* (like attempts to link defs that don't have required properties set).
*/
** Test of defs and symtab. There should be far more tests of edge conditions
** (like attempts to link defs that don't have required properties set).
*/

#include "upb/def.h"
#include "upb/pb/glue.h"
Expand Down
6 changes: 0 additions & 6 deletions tests/test_handlers.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
*
*/

#include "upb/handlers.h"
#include "upb/descriptor/descriptor.upb.h"
Expand Down
3 changes: 0 additions & 3 deletions tests/test_table.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
*
* Tests for upb_table.
*/
Expand Down
8 changes: 2 additions & 6 deletions tests/test_util.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2014 Google Inc. See LICENSE for details.
*
* Common functionality for tests.
*/
** Common functionality for tests.
**/

#ifndef UPB_TEST_UTIL_H_
#define UPB_TEST_UTIL_H_
Expand Down
2 changes: 0 additions & 2 deletions tests/testmain.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Copyright 2012 Google Inc. All Rights Reserved.
// Author: [email protected] (Josh Haberman)

#include <stdlib.h>
#ifdef USE_GOOGLE
Expand Down
5 changes: 0 additions & 5 deletions tests/upb_test.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2011 Google Inc. See LICENSE for details.
*/

#ifndef UPB_TEST_H_
#define UPB_TEST_H_
Expand Down
7 changes: 1 addition & 6 deletions upb/bindings/googlepb/bridge.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
//

// IMPORTANT NOTE! Inside Google, This file is compiled TWICE, once with
// UPB_GOOGLE3 defined and once without! This allows us to provide
// functionality against proto2 and protobuf opensource both in a single binary
Expand Down
7 changes: 3 additions & 4 deletions upb/bindings/googlepb/bridge.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
// upb::googlepb::DefBuilder
// upb::googlepb::WriteHandlers
// upb::googlepb::CodeCache
//
// This file contains functionality for constructing upb Defs and Handlers
// corresponding to proto2 messages. Using this functionality, you can use upb
Expand Down
5 changes: 0 additions & 5 deletions upb/bindings/googlepb/proto1.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
//
// This set of handlers can write into a proto2::Message whose reflection class
// is _pi::Proto2Reflection (ie. proto1 messages; while slightly confusing, the
// name "Proto2Reflection" indicates that it is a reflection class implementing
Expand Down
6 changes: 0 additions & 6 deletions upb/bindings/googlepb/proto1.int.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
//
// Support for registering field handlers that can write into a legacy proto1
// message. This functionality is only needed inside Google.
//
Expand Down
5 changes: 0 additions & 5 deletions upb/bindings/googlepb/proto2.cc
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
//
// Note that we have received an exception from c-style-artiters regarding
// dynamic_cast<> in this file:
// https://groups.google.com/a/google.com/d/msg/c-style/7Zp_XCX0e7s/I6dpzno4l-MJ
Expand Down
6 changes: 0 additions & 6 deletions upb/bindings/googlepb/proto2.int.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
//
// upb - a minimalist implementation of protocol buffers.
//
// Copyright (c) 2011-2012 Google Inc. See LICENSE for details.
// Author: Josh Haberman <[email protected]>
//
// Support for registering field handlers that can write into a proto2
// message that uses GeneratedMessageReflection (which includes all messages
// generated by the proto2 compiler as well as DynamicMessage).
Expand Down
6 changes: 0 additions & 6 deletions upb/bindings/linux/assert.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*/

#include <linux/kernel.h>

Expand Down
6 changes: 0 additions & 6 deletions upb/bindings/linux/errno.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*/

#include <linux/errno.h>
6 changes: 0 additions & 6 deletions upb/bindings/linux/stdint.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*/

#include <linux/types.h>
8 changes: 0 additions & 8 deletions upb/bindings/linux/stdio.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,2 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Linux-kernel implementations of some stdlib.h functions.
*/

#include <linux/kernel.h> // For sprintf and friends.
9 changes: 2 additions & 7 deletions upb/bindings/linux/stdlib.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Linux-kernel implementations of some stdlib.h functions.
*/
** Linux-kernel implementations of some stdlib.h functions.
*/

#include <linux/slab.h>

Expand Down
6 changes: 0 additions & 6 deletions upb/bindings/linux/string.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*/

#ifndef UPB_LINUX_STRING_H_
#define UPB_LINUX_STRING_H_
Expand Down
43 changes: 20 additions & 23 deletions upb/bindings/lua/upb.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2009 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* A Lua extension for upb. Exposes only the core library
* (sub-libraries are exposed in other extensions).
*
* 64-bit woes: Lua can only represent numbers of type lua_Number (which is
* double unless the user specifically overrides this). Doubles can represent
* the entire range of 64-bit integers, but lose precision once the integers are
* greater than 2^53.
*
* Lua 5.3 is adding support for integers, which will allow for 64-bit
* integers (which can be interpreted as signed or unsigned).
*
* LuaJIT supports 64-bit signed and unsigned boxed representations
* through its "cdata" mechanism, but this is not portable to regular Lua.
*
* Hopefully Lua 5.3 will come soon enough that we can either use Lua 5.3
* integer support or LuaJIT 64-bit cdata for users that need the entire
* domain of [u]int64 values.
*/
** require("lua") -- A Lua extension for upb.
**
** Exposes only the core library
** (sub-libraries are exposed in other extensions).
**
** 64-bit woes: Lua can only represent numbers of type lua_Number (which is
** double unless the user specifically overrides this). Doubles can represent
** the entire range of 64-bit integers, but lose precision once the integers are
** greater than 2^53.
**
** Lua 5.3 is adding support for integers, which will allow for 64-bit
** integers (which can be interpreted as signed or unsigned).
**
** LuaJIT supports 64-bit signed and unsigned boxed representations
** through its "cdata" mechanism, but this is not portable to regular Lua.
**
** Hopefully Lua 5.3 will come soon enough that we can either use Lua 5.3
** integer support or LuaJIT 64-bit cdata for users that need the entire
** domain of [u]int64 values.
*/

#include <float.h>
#include <math.h>
Expand Down
9 changes: 2 additions & 7 deletions upb/bindings/lua/upb.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Shared definitions for upb Lua modules.
*/
** Shared definitions for upb Lua modules.
*/

#ifndef UPB_LUA_UPB_H_
#define UPB_LUA_UPB_H_
Expand Down
15 changes: 5 additions & 10 deletions upb/bindings/lua/upb/pb.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2014 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* A Lua extension for upb.pb.
*
* Exposes all the types defined in upb/pb/{*}.h
* Also defines a few convenience functions on top.
*/
** require("upb.pb") -- A Lua extension for upb.pb.
**
** Exposes all the types defined in upb/pb/{*}.h
** Also defines a few convenience functions on top.
*/

#include "upb/bindings/lua/upb.h"
#include "upb/pb/decoder.h"
Expand Down
30 changes: 13 additions & 17 deletions upb/bindings/lua/upb/table.c
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2012 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Lua extension that provides access to upb_table. This is an internal-only
* interface and exists for the sole purpose of writing a C code generator in
* Lua that can dump a upb_table as static C initializers. This lets us use
* Lua for convenient string manipulation while saving us from re-implementing
* the upb_table hash function and hash table layout / collision strategy in
* Lua.
*
* Since this is used only as part of the toolchain (and not part of the
* runtime) we do not hold this module to the same stringent requirements as
* the main Lua modules (for example that misbehaving Lua programs cannot
* crash the interpreter).
*/
** require("upb.table") -- a Lua extension for accessing upb_table
**
** This is an internal-only interface and exists for the sole purpose of
** writing a C code generator in Lua that can dump a upb_table as static C
** initializers. This lets us use Lua for convenient string manipulation while
** saving us from re-implementing the upb_table hash function and hash table
** layout / collision strategy in Lua.
**
** Since this is used only as part of the toolchain (and not part of the
** runtime) we do not hold this module to the same stringent requirements as
** the main Lua modules (for example that misbehaving Lua programs cannot
** crash the interpreter).
*/

#include <float.h>
#include <math.h>
Expand Down
11 changes: 3 additions & 8 deletions upb/bindings/python/upb.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2009 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* Python extension exposing the core of upb: definitions, handlers,
* and a message type.
*/
** Python extension exposing the core of upb: definitions, handlers,
** and a message type.
**/

#include <stddef.h>
#include <Python.h>
Expand Down
9 changes: 2 additions & 7 deletions upb/bindings/ruby/upb.c
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
* upb - a minimalist implementation of protocol buffers.
*
* Copyright (c) 2014 Google Inc. See LICENSE for details.
* Author: Josh Haberman <[email protected]>
*
* upb (prototype) extension for Ruby.
*/
** upb (prototype) extension for Ruby.
*/

#include "ruby/ruby.h"
#include "ruby/vm.h"
Expand Down
4 changes: 0 additions & 4 deletions upb/bindings/stdc++/string.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Copyright 2014 Google Inc. All Rights Reserved.
// Author: [email protected] (Josh Haberman)
//
// upb - a minimalist implementation of protocol buffers.

#ifndef UPB_STDCPP_H_
#define UPB_STDCPP_H_
Expand Down
Loading

0 comments on commit 49dab06

Please sign in to comment.