[ 
https://issues.apache.org/jira/browse/DISPATCH-2272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17455315#comment-17455315
 ] 

ASF GitHub Bot commented on DISPATCH-2272:
------------------------------------------

ganeshmurthy commented on a change in pull request #1413:
URL: https://github.com/apache/qpid-dispatch/pull/1413#discussion_r764969413



##########
File path: include/qpid/dispatch/internal/export.h
##########
@@ -0,0 +1,27 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+/// @cond INTERNAL
+
+/// import/export macros
+#if defined(_WIN32)
+#  define QD_EXPORT __declspec(dllexport)
+#else
+#  define QD_EXPORT __attribute__((visibility("default"))) 
__attribute__((used))

Review comment:
       I was looking at this - 
https://developer.arm.com/documentation/dui0491/f/Compiler-specific-Features/--attribute----used---function-attribute?lang=en
   
   It seems to say that "This function attribute informs the compiler that a 
static function is to be retained in the object file, even if it is 
unreferenced."
   
   Is it true that __attribute__((used)) can *only* be used on *static* 
functions ?
   
   I also understand from reading this - 
https://developer.arm.com/documentation/dui0491/f/BABCJJID - that 
__attribute__((used)) can also be used with  *static* variables, although I 
understand that this PR is not attempting to do so. 
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> Mark all functions called from Python with QD_EXPORT
> ----------------------------------------------------
>
>                 Key: DISPATCH-2272
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2272
>             Project: Qpid Dispatch
>          Issue Type: Sub-task
>    Affects Versions: 1.17.0
>            Reporter: Jiri Daněk
>            Priority: Major
>
> Dispatch requires that all C functions it calls be exported, because it looks 
> them up as if in a dynamic library. This is important on Windows, where 
> functions are unexported by default.
> On Windows, use {{__declspec(dllexport)}} to turn on exporting. Without it, 
> the functions will not be found from Python.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to