• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

超漢字アプリケーション開発用のProtocol Buffersコンパイラの開発


Commit MetaInfo

Revisão5c2269fa59bb5be43d6ecd8d83d6f14cc235163f (tree)
Hora2015-03-06 02:44:08
Autorornse01 <ornse01@user...>
Commiterornse01

Mensagem de Log

fix message type name to absolute name.

Mudança Sumário

Diff

--- a/src/protobuf/cgenerator.rb
+++ b/src/protobuf/cgenerator.rb
@@ -119,7 +119,11 @@ class Protobuf::CGenerator::Message
119119 end
120120
121121 def name
122- @msg_node.name
122+ @msg_node.absolute_name.gsub('.', '__')
123+ end
124+
125+ def absolute_name
126+ @msg_node.absolute_name
123127 end
124128
125129 def each_field
--- a/src/protobuf/template.h.erb
+++ b/src/protobuf/template.h.erb
@@ -8,14 +8,14 @@ typedef struct <%= m.name %>_ <%= m.name %>;
88 <%- end -%>
99
1010 <%- msg_list.each do |m| -%>
11-/* <%= m.name %> */
11+/* <%= m.absolute_name %> */
1212 IMPORT <%= m.name %>* <%= m.name %>__new();
1313 IMPORT VOID <%= m.name %>__delete(<%= m.name %> *m);
1414 IMPORT Bool <%= m.name %>__isequal(<%= m.name %> *m, <%= m.name %> *other);
1515 IMPORT VOID <%= m.name %>__swap(<%= m.name %> *m, <%= m.name %> *other);
1616
1717 <%- m.each_field do |f| -%>
18-/* <%= m.name %>.<%= f.name %> */
18+/* <%= m.absolute_name %>.<%= f.name %> */
1919 <%- if f.is_singular_numeric? -%>
2020 IMPORT Bool <%= m.name %>__has_<%= f.name %>(<%= m.name %> *m);
2121 IMPORT <%= f.to_c_type %> <%= m.name %>__<%= f.name %>(<%= m.name %> *m);