savio pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=996ad5b8b64faf63192d3e661b448f1cb5842470

commit 996ad5b8b64faf63192d3e661b448f1cb5842470
Author: Savio Sena <sa...@expertisesolutions.com.br>
Date:   Tue Sep 16 19:10:40 2014 -0300

    examples: Add extern "C" guards to C++ example.
---
 src/examples/box_cxx_example_02.cc | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/examples/box_cxx_example_02.cc 
b/src/examples/box_cxx_example_02.cc
index 676a154..28950f4 100644
--- a/src/examples/box_cxx_example_02.cc
+++ b/src/examples/box_cxx_example_02.cc
@@ -1,6 +1,10 @@
 //Compile with:
 //gcc -g box_example_02.c -o box_example_02 `pkg-config --cflags --libs 
elementary`
 
+
+extern "C"
+{
+
 #ifdef HAVE_CONFIG_H
 # include <elementary_config.h>
 #endif
@@ -16,8 +20,6 @@
 #define ELM_INTERFACE_ATSPI_IMAGE_PROTECTED
 #define ELM_INTERFACE_ATSPI_WIDGET_ACTION_PROTECTED
 
-#include <iostream>
-
 #include <Elementary.h>
 
 #include <Eo.h>
@@ -30,6 +32,9 @@
 
 #include "elm_interface_atspi_widget_action.h"
 #include "elm_interface_atspi_widget_action.eo.h"
+}
+
+#include <iostream>
 
 #include <elm_win.eo.hh>
 #include <elm_box.eo.hh>
@@ -122,7 +127,7 @@ elm_main(int argc, char *argv[])
           {
             elm_button btn ( efl::eo::parent = *box );
             btn.text_set("elm.text", "I do nothing");
-            efl::eina::list<evas::object> childrens = box->children_get();
+            efl::eina::list<evas::object> childrens(box->children_get());
             if (!childrens.empty())
               {
                 box->pack_after(btn, childrens.front());

-- 


Reply via email to