Permalink
Browse files

Generate code into the proto's package, not into its Java outer Class.

  • Loading branch information...
1 parent 793be4a commit fbeb72866ce55a477f404021f5f822e172095878 @brown committed Feb 6, 2012
Showing with 7 additions and 5 deletions.
  1. +3 −3 message-test.lisp
  2. +4 −2 protoc/lisp/helpers.cc
View
@@ -39,7 +39,7 @@
#:com.google.protobuf.test
#:hu.dwim.stefil
#:protobuf-test-config
- #:unittest-proto)
+ #:protobuf-unittest)
(:export #:test-message))
(in-package #:message-test)
@@ -134,12 +134,12 @@
(t (is (eql value expected)))))
(defun field-function (prefix field)
- (let ((package (find-package 'unittest-proto))
+ (let ((package (find-package 'protobuf-unittest))
(symbol-name (concatenate 'string prefix (symbol-name field))))
(symbol-function (find-symbol symbol-name package))))
(defun field-setter (field)
- (let ((package (find-package 'unittest-proto)))
+ (let ((package (find-package 'protobuf-unittest)))
(fdefinition `(setf ,(find-symbol (symbol-name field) package)))))
(defun expect-all-fields-set (m)
View
@@ -69,8 +69,10 @@ string StripProto(const string& filename) {
string FileLispPackage(const FileDescriptor* file) {
if (file->options().has_java_package()) {
return LispifyName(file->options().java_package());
- } else if (file->options().has_java_outer_classname()) {
- return LispifyName(file->options().java_outer_classname());
+// } else if (file->options().has_java_outer_classname()) {
+// return LispifyName(file->options().java_outer_classname());
+ } else if (file->package().size() != 0) {
+ return LispifyName(file->package());
} else {
return "protocol-buffer";
}

0 comments on commit fbeb728

Please sign in to comment.