D14132: Improve Julia login time
Alexander Semke
noreply at phabricator.kde.org
Mon Jul 16 07:30:17 BST 2018
asemke added inline comments.
INLINE COMMENTS
> juliaserver.cpp:153
> + jl_function_t* jl_string_function = jl_get_function(jl_base_module, "string");
> + jl_function_t* jl_names_function = jl_get_function(jl_base_module, "names");
> +
jl_names_function can be defined later when it's needed, after the potential "return" couple of lines below.
> juliaserver.cpp:155
> +
> + QString moduleName = QString::fromUtf8(jl_string_ptr(jl_call1(jl_string_function, (jl_value_t*)(module->name))));
> + if (module != jl_internal_main_module)
moduleName is only required if module != jl_internal_main_module. So, put this inside of the if-statement.
> juliaserver.cpp:211
> +{
> + return m_foundVariables;
> +}
m_variables instead of m_foundVariables?
> juliaserver.cpp:216
> +{
> + return m_foundVariableValues;
> +}
m_variableValues instead of m_foundVariableValues?
> juliaserver.cpp:221
> +{
> + return m_foundFunctions;
> +}
m_functions instead of m_foundFunctions?
> juliasession.cpp:239
> + const QString& name = variables[i];
> + QString value = values[i];
> + if (value != JuliaVariableManagementExtension::REMOVED_VARIABLE_MARKER)
Add a sanity check for the case when values.size() != variables.size():
if (i>=values.size()) continue;
REPOSITORY
R55 Cantor
REVISION DETAIL
https://phabricator.kde.org/D14132
To: sirgienko, asemke
Cc: kde-edu, asemke, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20180716/9e34adbe/attachment-0001.html>
More information about the kde-edu
mailing list